Inherits YGP::INISection.
Public Member Functions | |
INIList (const char *name, L &values) | |
~INIList () | |
void | write (std::ostream &stream) |
Static Public Member Functions | |
static void | write (std::ostream &stream, const char *section, const L &values) |
Protected Member Functions | |
virtual int | foundKey (const char *key, unsigned int) |
virtual int | foundValue (const char *value, unsigned int len) |
The entries of the section must have a numeric key, which specifies the (zero-based) offset of the entry of the list its value belongs to.
YGP::INIList< T, L >::INIList | ( | const char * | name, | |
L & | values | |||
) | [inline] |
Constructor; Creates an object named name
and a vector to receive the parsed values.
name | Name of the section | |
values | List to store the passed values |
YGP::INIList< T, L >::~INIList | ( | ) | [inline] |
Destructor; Frees the internally used attribute list.
virtual int YGP::INIList< T, L >::foundKey | ( | const char * | key, | |
unsigned | int | |||
) | [inline, protected, virtual] |
Callback when a key is found while parsing the INI-file (during parsing the INIList).
This method considers the key
as offet for the value in the list.
Reimplemented from YGP::INISection.
virtual int YGP::INIList< T, L >::foundValue | ( | const char * | value, | |
unsigned int | len | |||
) | [inline, protected, virtual] |
Callback when a value is found while parsing the INI-file (during parsing the INIList).
This method assigns value
to the previously parsed offset.
Reimplemented from YGP::INISection.
static void YGP::INIList< T, L >::write | ( | std::ostream & | stream, | |
const char * | section, | |||
const L & | values | |||
) | [inline, static] |
Writes the contents of the passed values to the passed stream (in its own section named section
).
stream | Stream to write to | |
section | Name of section to write | |
values | Values to write |
void YGP::INIList< T, L >::write | ( | std::ostream & | stream | ) | [inline] |
Writes the contents of the holded attribute values to the passed stream (in its own section).
stream | Stream to write to |