#include <FS_WriterStream.h>
|
virtual bool | init (const char *file) |
|
virtual bool | destroy (bool removefile) |
|
FS_WriterStream::FS_WriterStream |
( |
| ) |
|
Default constructor, sets myStream to NULL.
FS_WriterStream::FS_WriterStream |
( |
const char * |
file | ) |
|
Convenience constructor for files on disk. Basically just calls init().
virtual FS_WriterStream::~FS_WriterStream |
( |
| ) |
|
|
virtual |
Destructor. Calls destroy() virtual, but since this is a destructor, any overriding destroy() methods in derived classes won't be called and should be explicitly invoked in derived class's destructor.
virtual bool FS_WriterStream::destroy |
( |
bool |
removefile | ) |
|
|
protectedvirtual |
Destroys the output stream and removes file. If the stream refers to a section in an index file, the data is flushed out and the new section is embedded in the index file.
virtual int64 FS_WriterStream::getMemoryUsage |
( |
bool |
inclusive | ) |
const |
|
virtual |
virtual bool FS_WriterStream::init |
( |
const char * |
file | ) |
|
|
protectedvirtual |
Sets myFile member to file argument and creates myStream output stream. If file refers to a section in an index file (ie, using standard convention, the file name contains the '?' section separator character), then it creates a temporery file (whose path is stored in myTempFile) and a stream for that temporary file (represented by myStream), where the section data is being written out. In destroy(), the temp file is embedded into the final destination index file and then removed.
bool FS_WriterStream::removeFile |
( |
| ) |
|
Deletes the file, if possible.
File path for the output stream. It can be an empty string if stream does not refer to a file.
Definition at line 74 of file FS_WriterStream.h.
The stream object used for writing out data. This class creates default stream for disk files, but derived classes can override init() and destroy() to create custom output streams.
Definition at line 84 of file FS_WriterStream.h.
Path to the temporary file, if the original file path refers to a section in an index file. This temp file holds new data written to that section.
Definition at line 79 of file FS_WriterStream.h.
The documentation for this class was generated from the following file: