#include <lemon/lemon_reader.h>
Inherits CommonSectionReaderBase.
Inheritance diagram for NodeSetReader:
@nodeset
nodeset_id
, but the nodeset_id
may be empty.The first line of the section contains the names of the maps separated with white spaces. Each next lines describes a node in the nodeset, and contains the mapped values for each map.
If the nodeset contains an "id"
named map then it will be regarded as id map. This map should contain only unique values and when the readId()
member will read a value from the given stream it will give back that node which is mapped to this value.
Public Member Functions | |
NodeSetReader (LemonReader &_reader, typename SmartParameter< Graph >::Type _graph, const std::string &_id=std::string(), const DefaultSkipper &_skipper=DefaultSkipper()) | |
Constructor. | |
virtual | ~NodeSetReader () |
Destructor. | |
template<typename Map> | |
NodeSetReader & | readNodeMap (std::string name, Map &map) |
Add a new node map reader command for the reader. | |
template<typename Reader, typename Map> | |
NodeSetReader & | readNodeMap (std::string name, Map &map, const Reader &reader=Reader()) |
Add a new node map reader command for the reader. | |
template<typename Reader> | |
NodeSetReader & | skipNodeMap (std::string name, const Reader &reader=Reader()) |
Add a new node map skipper command for the reader. | |
bool | isIdReader () const |
Returns true if the nodeset can give back the node by its id. | |
void | readId (std::istream &is, Node &node) const |
Gives back the node by its id. | |
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. |
|
Constructor for NodeSetReader. It creates the NodeSetReader and attach it into the given LemonReader. The nodeset reader will add the readed nodes to the given Graph. The reader will read the section when the |
|
Destructor for NodeSetReader. |
|
Add a new node map reader command for the reader. |
|
Add a new node map reader command for the reader. |
|
Add a new node map skipper command for the reader. |
|
It gives back true when the header line starts with Implements LemonReader::SectionReader. |
|
It reads the content of the section. Implements LemonReader::SectionReader. |
|
Returns true if the nodeset can give back the node by its id. It is possible only if an "id" named map was read. |
|
It reads an id from the stream and gives back which node belongs to it. It is possible only if there was read an "id" named map. |