In the Lemon Format each section starts with a line containing a @
character on the first not white space position. This line is the header line of the section. Each of the next lines belong to this section until a line starting with @
character is found. This line can start a new section or it can close the file with the @end
line. The file format ignores the empty and comment lines. The line is comment line if it starts with a #
character.
The framework provides an abstract LemonReader::SectionReader class that defines the interface of a SectionReader. The SectionReader has the header()
member function that gets a header line string and decides if it wants to process the next section. Several SectionReaders can be attached to a LemonReader and the first attached that can process the section will be used. Its read()
member will be called with a stream containing the section. From this stream the empty and comment lines are filtered out. #include <lemon/lemon_reader.h>
Classes | |
class | SectionReader |
Abstract base class for reading a section. More... | |
Public Member Functions | |
LemonReader (std::istream &_is) | |
Constructor for LemonReader. | |
LemonReader (const std::string &filename) | |
Constructor for LemonReader. | |
~LemonReader () | |
void | run () |
Executes the LemonReader. |
LemonReader | ( | std::istream & | _is | ) | [inline] |
Constructor for LemonReader which reads from the given stream.
LemonReader | ( | const std::string & | filename | ) | [inline] |
Constructor for LemonReader which reads from the given file.
~LemonReader | ( | ) | [inline] |
Desctructor for LemonReader.
void run | ( | ) | [inline] |
It executes the LemonReader.