Helper for reading strings. More...
#include <strgen.h>
Public Member Functions | |
StringReader (StringData &data, const char *file, bool master, bool translation) | |
Prepare reading. | |
virtual | ~StringReader () |
Make sure the right reader gets freed. | |
void | HandleString (char *str) |
virtual char * | ReadLine (char *buffer, size_t size)=0 |
Read a single line from the source of strings. | |
virtual void | HandlePragma (char *str)=0 |
Handle the pragma of the file. | |
virtual void | ParseFile () |
Start parsing the file. | |
Data Fields | |
StringData & | data |
The data to fill during reading. | |
const char * | file |
The file we are reading. | |
bool | master |
Are we reading the master file? | |
bool | translation |
Are we reading a translation, implies !master. However, the base translation will have this false. |
Helper for reading strings.
Definition at line 60 of file strgen.h.
StringReader::StringReader | ( | StringData & | data, | |
const char * | file, | |||
bool | master, | |||
bool | translation | |||
) |
Prepare reading.
data | The data to fill during reading. | |
file | The file we are reading. | |
master | Are we reading the master file? | |
translation | Are we reading a translation? |
Definition at line 580 of file strgen_base.cpp.
StringReader::~StringReader | ( | ) | [virtual] |
Make sure the right reader gets freed.
Definition at line 586 of file strgen_base.cpp.
virtual void StringReader::HandlePragma | ( | char * | str | ) | [pure virtual] |
Handle the pragma of the file.
str | The pragma string to parse. |
Implemented in StringListReader, and FileStringReader.
virtual char* StringReader::ReadLine | ( | char * | buffer, | |
size_t | size | |||
) | [pure virtual] |
Read a single line from the source of strings.
buffer | The buffer to read the data in to. | |
size | The size of the buffer. |
Implemented in StringListReader, and FileStringReader.
Referenced by ParseFile().