csMemFile Class Reference
Essentially a raw memory buffer which implements the abstract iFile interface. More...
#include <memfile.h>
Inheritance diagram for csMemFile:

Public Types | |
| enum | Disposition { DISPOSITION_DELETE, DISPOSITION_FREE, DISPOSITION_IGNORE } |
| Disposition of memory buffer at destruction time. More... | |
Public Methods | |
| csMemFile () | |
| Construct an empty memory file. | |
| csMemFile (const char *, size_t) | |
| Construct a memory file from an existing memory buffer but do not free. | |
| csMemFile (char *, size_t, Disposition=DISPOSITION_DELETE) | |
| Construct a memory file from an existing memory buffer and free later. | |
| virtual | ~csMemFile () |
| Destructor. | |
| virtual const char * | GetName () |
| Returns "csMemFile";. | |
| virtual size_t | GetSize () |
| Query buffer size. | |
| virtual int | GetStatus () |
| Check (and clear) file last error status. | |
| virtual size_t | Read (char *Data, size_t DataSize) |
| Read data from buffer. | |
| virtual size_t | Write (const char *Data, size_t DataSize) |
| Write data to buffer. | |
| virtual void | Flush () |
| Flush the stream. | |
| virtual bool | AtEOF () |
| Return true if at end of buffer. | |
| virtual size_t | GetPos () |
| Query current cursor position. | |
| virtual bool | SetPos (size_t) |
| Set current cursor position. | |
| virtual csPtr< iDataBuffer > | GetAllData (bool nullterm=false) |
| Get entire file data in one go. | |
| virtual const char * | GetData () const |
| Returns a pointer to the memory buffer. | |
Detailed Description
Essentially a raw memory buffer which implements the abstract iFile interface.
Definition at line 29 of file memfile.h.
Member Enumeration Documentation
|
|
Disposition of memory buffer at destruction time.
|
Constructor & Destructor Documentation
|
|
Construct an empty memory file.
|
|
||||||||||||
|
Construct a memory file from an existing memory buffer but do not free.
|
|
||||||||||||||||
|
Construct a memory file from an existing memory buffer and free later.
|
|
|
Destructor.
|
Member Function Documentation
|
|
Return true if at end of buffer.
Implements iFile. |
|
|
Flush the stream.
Implements iFile. |
|
|
Get entire file data in one go. Creates a copy of the data, so changing the file won't affect any buffers previously returned by this function. Implements iFile. |
|
|
Returns a pointer to the memory buffer. May return 0 if memory file is empty. Use GetSize() for size info. |
|
|
Returns "csMemFile";.
Implements iFile. |
|
|
Query current cursor position.
Implements iFile. |
|
|
Query buffer size.
Implements iFile. |
|
|
Check (and clear) file last error status.
Implements iFile. |
|
||||||||||||
|
Read data from buffer.
Implements iFile. |
|
|
Set current cursor position.
Implements iFile. |
|
||||||||||||
|
Write data to buffer.
Implements iFile. |
The documentation for this class was generated from the following file:
- csutil/memfile.h
Generated for Crystal Space by doxygen 1.2.18
