The first line of the section contains the names of the maps separated with white spaces. Each next lines describes an edge in the edgeset. The line contains the connected nodes' id and the mapped values for each map.
The section can handle the directed as a syntactical sugar. Two undirected edge map describes one directed edge map. This two maps are the forward map and the backward map and the names of this map is near the same just with a prefix '+'
or '-'
character difference.
The undirected edgeset reader needs a node id reader to identify which nodes have to be connected. If a NodeSetReader reads an "label" named map, it will be able to resolve the nodes by ids.
|
Public Member Functions |
template<typename NodeLabelReader> |
| UEdgeSetReader (LemonReader &_reader, Graph &_graph, const NodeLabelReader &_nodeLabelReader, const std::string &_name=std::string(), const DefaultSkipper &_skipper=DefaultSkipper()) |
| Constructor.
|
virtual | ~UEdgeSetReader () |
| Destructor.
|
template<typename Map> |
UEdgeSetReader & | readUEdgeMap (std::string name, Map &map) |
| Add a new undirected edge map reader command for the reader.
|
template<typename Reader, typename Map> |
UEdgeSetReader & | readUEdgeMap (std::string name, Map &map, const Reader &reader=Reader()) |
| Add a new undirected edge map reader command for the reader.
|
template<typename Reader> |
UEdgeSetReader & | skipUEdgeMap (std::string name, const Reader &reader=Reader()) |
| Add a new undirected edge map skipper command for the reader.
|
template<typename Map> |
UEdgeSetReader & | readEdgeMap (std::string name, Map &map) |
| Add a new directed edge map reader command for the reader.
|
template<typename Reader, typename Map> |
UEdgeSetReader & | readEdgeMap (std::string name, Map &map, const Reader &reader=Reader()) |
| Add a new directed edge map reader command for the reader.
|
template<typename Reader> |
UEdgeSetReader & | skipEdgeMap (std::string name, const Reader &reader=Reader()) |
| Add a new directed edge map skipper command for the reader.
|
bool | isLabelReader () const |
| Returns true if the edgeset can give back the edge by its label.
|
void | readLabel (std::istream &is, UEdge &uEdge) const |
| Gives back the undirected edge by its label.
|
void | readLabel (std::istream &is, Edge &edge) const |
| Gives back the directed edge by its label.
|
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.
|