Public Member Functions | |
OFConfigFileCursor () | |
default constructor | |
OFConfigFileCursor (const OFConfigFileCursor &source) | |
copy constructor | |
~OFConfigFileCursor () | |
destructor | |
OFConfigFileCursor & | operator= (const OFConfigFileCursor &source) |
assignment operator | |
void | clear () |
return object to default constructed state (invalid cursor) | |
const char * | getKeyword (unsigned int level) const |
return keyword as C string. | |
const char * | getValue (unsigned int level) const |
return value as C string Precondition is that section_valid(level) return true. | |
OFBool | section_valid (unsigned int level) const |
checks if the cursor points to a valid location up to the given level | |
void | set_section (unsigned int level, const char *key, OFConfigFileNode *anchor) |
sets cursor to the entry with keyword "key" at the given level. | |
void | first_section (unsigned int level, OFConfigFileNode *anchor) |
sets cursor to the first entry at the given level (without changing the cursor position at higher levels). | |
void | next_section (unsigned int level) |
sets cursor to the next entry at the given level (without changing the cursor position at higher levels). | |
void | insert (unsigned int level, OFConfigFileNode *newnode, OFConfigFileNode *&anchor) |
inserts a new node into the tree at the current cursor position | |
OFBool | operator< (const OFConfigFileCursor &) const |
dummy comparison operator, needed by MSVC5 with STL. | |
OFBool | operator== (const OFConfigFileCursor &) const |
dummy comparison operator, needed by MSVC5 with STL. | |
Private Attributes | |
OFPConfigFileNode | ptr [OFConfigFile_MaxLevel+1] |
the cursor is an array of pointers to OFConfigFileNode objects |
Definition at line 178 of file ofconfig.h.
|
sets cursor to the first entry at the given level (without changing the cursor position at higher levels). Cursor must be valid at the level higher than the one specified. If no section is found the cursor becomes invalid at the specified level. The cursor always becomes invalid at all levels lower than specified.
Referenced by OFConfigFile::first_section(). |
|
return keyword as C string. Precondition is that section_valid(level) return true.
Definition at line 204 of file ofconfig.h. References OFConfigFileNode::getKeyword(), and ptr. |
|
return value as C string Precondition is that section_valid(level) return true.
Definition at line 213 of file ofconfig.h. References OFConfigFileNode::getValue(), and ptr. |
|
inserts a new node into the tree at the current cursor position
|
|
sets cursor to the next entry at the given level (without changing the cursor position at higher levels). Cursor must be valid at the level specified. If no section is found the cursor becomes invalid at the specified level. The cursor always becomes invalid at all levels lower than specified.
Referenced by OFConfigFile::next_section(). |
|
dummy comparison operator, needed by MSVC5 with STL.
Definition at line 276 of file ofconfig.h. |
|
dummy comparison operator, needed by MSVC5 with STL.
Definition at line 284 of file ofconfig.h. |
|
checks if the cursor points to a valid location up to the given level
Referenced by OFConfigFile::section_valid(). |
|
sets cursor to the entry with keyword "key" at the given level. Cursor must be valid at the level higher than the one specified. If the keyword exists more than once, the first occurance is found. If the keyword does not exist, the cursor becomes invalid at the specified level. The cursor always becomes invalid at all levels lower than specified.
Referenced by OFConfigFile::set_section(). |