LemonReader Class Reference
[Lemon Input-Output]


Detailed Description

The Lemon Format contains several sections. We do not want to determine what sections are in a lemon file we give only a framework to read a section oriented format.

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>

List of all members.

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

void run (  )  [inline]

It executes the LemonReader.


Generated on Thu Jun 4 04:04:58 2009 for LEMON by  doxygen 1.5.9