aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h')
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h146
1 files changed, 73 insertions, 73 deletions
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h
index de20ae7..e0fa06e 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h
@@ -1,73 +1,73 @@
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_WRITE_FILE_H_INCLUDED__ 5#ifndef __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__
6#define __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ 6#define __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__
7 7
8#include "IWriteFile.h" 8#include "IWriteFile.h"
9#include "IReadFile.h" 9#include "IReadFile.h"
10#include "irrArray.h" 10#include "irrArray.h"
11#include "irrString.h" 11#include "irrString.h"
12#include "memory.h" 12#include "memory.h"
13 13
14namespace irr 14namespace irr
15{ 15{
16namespace io 16namespace io
17{ 17{
18 18
19 //! Provides write acess to an array as if it is a file. 19 //! Provides write acess to an array as if it is a file.
20 class CMemoryReadWriteFile : public virtual IWriteFile, public virtual IReadFile 20 class CMemoryReadWriteFile : public virtual IWriteFile, public virtual IReadFile
21 { 21 {
22 public: 22 public:
23 23
24 CMemoryReadWriteFile(const c8* filename=0); 24 CMemoryReadWriteFile(const c8* filename=0);
25 25
26 //! Reads an amount of bytes from the file. 26 //! Reads an amount of bytes from the file.
27 //! \param buffer: Pointer to buffer of bytes to write. 27 //! \param buffer: Pointer to buffer of bytes to write.
28 //! \param sizeToWrite: Amount of bytes to wrtie to the file. 28 //! \param sizeToWrite: Amount of bytes to wrtie to the file.
29 //! \return Returns how much bytes were written. 29 //! \return Returns how much bytes were written.
30 virtual s32 write(const void* buffer, u32 sizeToWrite); 30 virtual s32 write(const void* buffer, u32 sizeToWrite);
31 31
32 //! Changes position in file, returns true if successful. 32 //! Changes position in file, returns true if successful.
33 //! \param finalPos: Destination position in the file. 33 //! \param finalPos: Destination position in the file.
34 //! \param relativeMovement: If set to true, the position in the file is 34 //! \param relativeMovement: If set to true, the position in the file is
35 //! changed relative to current position. Otherwise the position is changed 35 //! changed relative to current position. Otherwise the position is changed
36 //! from begin of file. 36 //! from begin of file.
37 //! \return Returns true if successful, otherwise false. 37 //! \return Returns true if successful, otherwise false.
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 //! \return Returns the size of the file in bytes. 41 //! \return Returns the size of the file in bytes.
42 virtual long getSize() const; 42 virtual long getSize() const;
43 43
44 //! Reads an amount of bytes from the file. 44 //! Reads an amount of bytes from the file.
45 //! \param buffer: Pointer to buffer where to read bytes will be written to. 45 //! \param buffer: Pointer to buffer where to read bytes will be written to.
46 //! \param sizeToRead: Amount of bytes to read from the file. 46 //! \param sizeToRead: Amount of bytes to read from the file.
47 //! \return Returns how much bytes were read. 47 //! \return Returns how much bytes were read.
48 virtual s32 read(void* buffer, u32 sizeToRead); 48 virtual s32 read(void* buffer, u32 sizeToRead);
49 49
50 //! Returns the current position in the file. 50 //! Returns the current position in the file.
51 //! \return Returns the current position in the file in bytes. 51 //! \return Returns the current position in the file in bytes.
52 virtual long getPos() const; 52 virtual long getPos() const;
53 53
54 //! Returns name of file. 54 //! Returns name of file.
55 //! \return Returns the file name as zero terminated character string. 55 //! \return Returns the file name as zero terminated character string.
56 virtual const io::path& getFileName() const; 56 virtual const io::path& getFileName() const;
57 57
58 //! Returns file data as an array 58 //! Returns file data as an array
59 core::array<c8>& getData(); 59 core::array<c8>& getData();
60 60
61 private: 61 private:
62 62
63 core::array<c8> Data; 63 core::array<c8> Data;
64 io::path FileName; 64 io::path FileName;
65 long Pos; 65 long Pos;
66 }; 66 };
67 67
68 68
69 69
70} // end namespace io 70} // end namespace io
71} // end namespace irr 71} // end namespace irr
72 72
73#endif // __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ 73#endif // __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__