@nodes
nodes_name
, but the nodes_name
may be empty.
Each line in the section contains the name of the node and then the node id. #include <lemon/lemon_reader.h>
Public Member Functions | |
template<typename _LabelReader > | |
NodeReader (LemonReader &_reader, const _LabelReader &_labelReader, const std::string &_name=std::string()) | |
Constructor. | |
virtual | ~NodeReader () |
Destructor. | |
void | readNode (std::string label, Node &item) |
Protected Member Functions | |
virtual bool | header (const std::string &line) |
Gives back true when the SectionReader can process the section with the given header line. | |
virtual void | read (std::istream &is) |
Reader function of the section. |
NodeReader | ( | LemonReader & | _reader, | |
const _LabelReader & | _labelReader, | |||
const std::string & | _name = std::string() | |||
) | [inline] |
Constructor for NodeReader. It creates the NodeReader and attach it into the given LemonReader. It will use the given node id reader to give back the nodes. The reader will read the section only if the _name
and the nodes_name
are the same.
virtual ~NodeReader | ( | ) | [inline, virtual] |
Destructor for NodeReader.
void readNode | ( | std::string | label, | |
Node & | item | |||
) | [inline] |
Add a node reader command for the NodeReader.
virtual bool header | ( | const std::string & | line | ) | [inline, protected, virtual] |
It gives back true when the header line start with @nodes
, and the header line's name and the reader's name are the same.
Implements SectionReader.
virtual void read | ( | std::istream & | is | ) | [inline, protected, virtual] |
It reads the content of the section.
Implements SectionReader.