aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CMemoryFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CMemoryFile.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CMemoryFile.h124
1 files changed, 62 insertions, 62 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CMemoryFile.h b/libraries/irrlicht-1.8/source/Irrlicht/CMemoryFile.h
index 98b4c25..5e96126 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CMemoryFile.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CMemoryFile.h
@@ -1,62 +1,62 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_MEMORY_READ_FILE_H_INCLUDED__ 5#ifndef __C_MEMORY_READ_FILE_H_INCLUDED__
6#define __C_MEMORY_READ_FILE_H_INCLUDED__ 6#define __C_MEMORY_READ_FILE_H_INCLUDED__
7 7
8#include "IReadFile.h" 8#include "IReadFile.h"
9#include "IWriteFile.h" 9#include "IWriteFile.h"
10#include "irrString.h" 10#include "irrString.h"
11 11
12namespace irr 12namespace irr
13{ 13{
14 14
15namespace io 15namespace io
16{ 16{
17 17
18 /*! 18 /*!
19 Class for reading and writing from memory. 19 Class for reading and writing from memory.
20 */ 20 */
21 class CMemoryFile : public IReadFile, public IWriteFile 21 class CMemoryFile : public IReadFile, public IWriteFile
22 { 22 {
23 public: 23 public:
24 24
25 //! Constructor 25 //! Constructor
26 CMemoryFile(void* memory, long len, const io::path& fileName, bool deleteMemoryWhenDropped); 26 CMemoryFile(void* memory, long len, const io::path& fileName, bool deleteMemoryWhenDropped);
27 27
28 //! Destructor 28 //! Destructor
29 virtual ~CMemoryFile(); 29 virtual ~CMemoryFile();
30 30
31 //! returns how much was read 31 //! returns how much was read
32 virtual s32 read(void* buffer, u32 sizeToRead); 32 virtual s32 read(void* buffer, u32 sizeToRead);
33 33
34 //! returns how much was written 34 //! returns how much was written
35 virtual s32 write(const void* buffer, u32 sizeToWrite); 35 virtual s32 write(const void* buffer, u32 sizeToWrite);
36 36
37 //! changes position in file, returns true if successful 37 //! changes position in file, returns true if successful
38 virtual bool seek(long finalPos, bool relativeMovement = false); 38 virtual bool seek(long finalPos, bool relativeMovement = false);
39 39
40 //! returns size of file 40 //! returns size of file
41 virtual long getSize() const; 41 virtual long getSize() const;
42 42
43 //! returns where in the file we are. 43 //! returns where in the file we are.
44 virtual long getPos() const; 44 virtual long getPos() const;
45 45
46 //! returns name of file 46 //! returns name of file
47 virtual const io::path& getFileName() const; 47 virtual const io::path& getFileName() const;
48 48
49 private: 49 private:
50 50
51 void *Buffer; 51 void *Buffer;
52 long Len; 52 long Len;
53 long Pos; 53 long Pos;
54 io::path Filename; 54 io::path Filename;
55 bool deleteMemoryWhenDropped; 55 bool deleteMemoryWhenDropped;
56 }; 56 };
57 57
58} // end namespace io 58} // end namespace io
59} // end namespace irr 59} // end namespace irr
60 60
61#endif 61#endif
62 62