The first line of the section contains the names of the maps separated with white spaces. Each next line describes an item in the itemset, and contains in the first column the label of the item and then the mapped values for each map. #include <lemon/lemon_reader.h>
Public Member Functions | |
template<typename _LabelReader > | |
NodeMapReader (LemonReader &_reader, const Graph &_graph, const _LabelReader &_labelReader, const std::string &_name=std::string(), const DefaultSkipper &_skipper=DefaultSkipper()) | |
Constructor. | |
virtual | ~NodeMapReader () |
Destructor. | |
template<typename Map > | |
NodeMapReader & | readNodeMap (std::string label, Map &map) |
template<typename ItemReader , typename Map > | |
NodeMapReader & | readNodeMap (std::string label, Map &map, const ItemReader &ir=ItemReader()) |
template<typename ItemReader > | |
NodeMapReader & | skipNodeMap (std::string label, const ItemReader &ir=ItemReader()) |
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. |
NodeMapReader | ( | LemonReader & | _reader, | |
const Graph & | _graph, | |||
const _LabelReader & | _labelReader, | |||
const std::string & | _name = std::string() , |
|||
const DefaultSkipper & | _skipper = DefaultSkipper() | |||
) | [inline] |
Constructor for NodeMapReader. It creates the NodeMapReader and attach it into the given LemonReader. The reader will read the section when the section_name
and the _name
are the same.
virtual ~NodeMapReader | ( | ) | [inline, virtual] |
Destructor for NodeMapReader.
NodeMapReader& readNodeMap | ( | std::string | label, | |
Map & | map | |||
) | [inline] |
Add a new node map reader command for the reader.
NodeMapReader& readNodeMap | ( | std::string | label, | |
Map & | map, | |||
const ItemReader & | ir = ItemReader() | |||
) | [inline] |
Add a new node map reader command for the reader.
NodeMapReader& skipNodeMap | ( | std::string | label, | |
const ItemReader & | ir = ItemReader() | |||
) | [inline] |
Add a new node map skipper command for the reader.
virtual bool header | ( | const std::string & | line | ) | [inline, protected, virtual] |
It gives back true when the header line starts with @mapset
, and the header line's name and the mapset'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.