#include <lemon/lemon_reader.h>
In the Lemon Format each section starts with a line contains a @
character on the first not white space position. This line is the header line of the section. Each next lines belong to this section while it does not starts with @
character. This line can start a new section or if it can close the file with the @end
line. The file format ignore the empty and comment lines. The line is comment line if it starts with a #
character.
The framework provides an abstract LemonReader::SectionReader class what defines the interface of a SectionReader. The SectionReader has the header()
member function what get a header line string and decides if it want to process the next section. Several SectionReaders can be attached to an LemonReader and the first attached what can process the section will be used. Its read()
member will called with a stream contains the section. From this stream the empty and comment lines are filtered out.
Public Member Functions | |
LemonReader (std::istream &_is) | |
Constructor for LemonReader. | |
LemonReader (const std::string &filename) | |
Constructor for LemonReader. | |
~LemonReader () | |
Desctructor for LemonReader. | |
void | run () |
Executes the LemonReader. | |
Classes | |
class | SectionReader |
Abstract base class for reading a section. More... |
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.