![]() |
Public API Reference |
#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. More... | |
csMemFile (const char *, size_t) | |
Construct a memory file from an existing memory buffer but do not free. More... | |
csMemFile (char *, size_t, Disposition=DISPOSITION_DELETE) | |
Construct a memory file from an existing memory buffer and free later. More... | |
virtual | ~csMemFile () |
Destructor. More... | |
virtual const char * | GetName () |
Returns "csMemFile";. More... | |
virtual size_t | GetSize () |
Query buffer size. More... | |
virtual int | GetStatus () |
Check (and clear) file last error status. More... | |
virtual size_t | Read (char *Data, size_t DataSize) |
Read data from buffer. More... | |
virtual size_t | Write (const char *Data, size_t DataSize) |
Write data to buffer. More... | |
virtual void | Flush () |
Flush the stream. More... | |
virtual bool | AtEOF () |
Return true if at end of buffer. More... | |
virtual size_t | GetPos () |
Query current cursor position. More... | |
virtual bool | SetPos (size_t) |
Set current cursor position. More... | |
virtual csPtr< iDataBuffer > | GetAllData (bool nullterm=false) |
Get entire file data in one go. More... | |
virtual const char * | GetData () const |
Returns a pointer to the memory buffer. More... |
Definition at line 28 of file memfile.h.
|
Disposition of memory buffer at destruction time.
|
|
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.
|
|
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 NULL 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. |