#include <StreamTokenizer.h>
Inheritance diagram for util::Section:

Public Methods | |
| Section (const std::string &name, const std::string &start) | |
| Create a section with the given name and start string. | |
| virtual | ~Section () |
| void | setCaseSensitive (bool bSensitive) |
| bool | isCaseSensitive (void) |
| void | addReplacement (const std::string &from, const std::string &to) |
| Replace all occurrences of from with to when reading this section. | |
| void | setName (const std::string &name) |
| Set the name for this section, e.g. | |
| std::string | getName (void) const |
| Get the name of this section. | |
| std::string & | name (void) |
| Get the name of this section. | |
| const std::string & | name (void) const |
| Get the name of this section. | |
| std::string | getStart (void) const |
| Get the start string. | |
| const std::string & | start (void) const |
| Get the start string. | |
| virtual std::string | readSection (std::istream &input)=0 throw (io::IOException&) |
| Read the section's contents from a stream. | |
| virtual int | compare (const char *ptr1, const char *ptr2, size_t len) |
| Compare two strings. | |
Protected Methods | |
| bool | checkReplace (unsigned char &, std::istream &, std::string &) |
Protected Attributes | |
| bool | _bCaseSensitive |
| bool | _baReplace [256] |
| std::string | _strName |
| std::string | _strStart |
| unsigned int | _iMaxReplacementLength |
| List< Pair< std::string, std::string > > | _lstReplacements |
Friends | |
| class | StreamTokenizer |
|
||||||||||||
|
Create a section with the given name and start string.
|
|
||||||||||||||||
|
Compare two strings. StreamTokenizer calls this method when it thinks it has found a section start. If the section start is case insensitive or it can otherwise take various forms, you can override this method to return 0 for all allowable section start strings. The default implementation returns strncmp(ptr1,ptr2,len).
|
|
|
Set the name for this section, e.g. "string" or "comment". |