#include <gauge3d/files/stringfile.h>
Inherits GAUGE3D::GFile.
Public Methods | |
| GStringFile () | |
| Construct an empty file. | |
| GStringFile (GString data) | |
| Construct a GStringFile with the given contents. | |
| virtual | ~GStringFile () |
| Destructor. | |
| virtual int | Size () |
| Gets the size of the file in bytes. | |
| virtual bool | Truncate () |
| Truncates the file to zero length. Returns false if file was not writable. | |
| virtual pGRawIStream | GetRawInputStream () |
| Get a GRawIStream for the file. May be null if the file is not readable. | |
| virtual pGRawOStream | GetRawOutputStream () |
| Get a GRawOStream for the file. May be null if the file is not writeable. | |
| virtual pFileMap | Map (int offset,int size,int flags) |
| Maps a portion of the file to memory. More... | |
| virtual GString | MapToDisk () |
| Copies the file to a temporary file on disk, if it is not already on the disk. More... | |
| virtual GString | Name () |
| Get the name of the file. More... | |
| void | Name (GString name) |
| Set the internal name of the file. | |
| void | Data (GString data) |
| Set the data contained by the file. | |
| virtual | operator GString () |
| Create a string containing the complete file. More... | |
The data in a GStringFile is stored as a GString. The idea here is that we want a file which can easily be cast to a string. This is used heavily by GConfigFile, which loads config files into a virtual filesystem where directories are sections of the config file and files are individual settings.
|
|
Maps a portion of the file to memory.
Reimplemented from GAUGE3D::GFile. |
|
|
Copies the file to a temporary file on disk, if it is not already on the disk.
Reimplemented from GAUGE3D::GFile. |
|
|
Get the name of the file.
Reimplemented from GAUGE3D::GFile. |
|
|
Create a string containing the complete file.
Reimplemented from GAUGE3D::GFile. |
1.2.4 written by Dimitri van Heesch,
© 1997-2000