Changeset 1901:723b2b81d900 in lemon-0.x for lemon/graph_reader.h
- Timestamp:
- 01/24/06 17:07:38 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2476
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/graph_reader.h
r1875 r1901 68 68 /// reader.readNodeMap("coords", coords); 69 69 /// 70 /// reader.readNodeMap<QuotedStringReader>("label", labelMap); 71 /// reader.skipNodeMap<QuotedStringReader>("description"); 70 /// reader.skipNodeMap("description", desc); 72 71 /// 73 72 /// reader.readNodeMap("color", colorMap); … … 307 306 } 308 307 309 /// \brief Gives back the node by its id. 310 /// 311 /// It reads an id from the stream and gives back which node belongs to 312 /// it. It is possible only if there was read an "id" named node map. 313 Node readId(std::istream& is, Node) const { 314 return nodeset_reader.readId(is, Node()); 308 309 /// \brief Returns true if the reader can give back the items by its label. 310 /// 311 /// \brief Returns true if the reader can give back the items by its label. 312 bool isLabelReader() const { 313 return nodeset_reader.isLabelReader() && edgeset_reader.isLabelReader(); 314 } 315 316 /// \brief Gives back the node by its label. 317 /// 318 /// It reads an label from the stream and gives back which node belongs to 319 /// it. It is possible only if there was read an "label" named node map. 320 void readLabel(std::istream& is, Node& node) const { 321 nodeset_reader.readLabel(is, node); 315 322 } 316 323 317 /// \brief Gives back the edge by its id.318 /// 319 /// It reads an idfrom the stream and gives back which edge belongs to320 /// it. It is possible only if there was read an " id" named edge map.321 Edge readId(std::istream& is, Edge) const {322 return edgeset_reader.read Id(is, Edge());324 /// \brief Gives back the edge by its label. 325 /// 326 /// It reads an label from the stream and gives back which edge belongs to 327 /// it. It is possible only if there was read an "label" named edge map. 328 void readLabel(std::istream& is, Edge& edge) const { 329 return edgeset_reader.readLabel(is, edge); 323 330 } 324 331 … … 405 412 /// reader.readNodeMap("coords", coords); 406 413 /// 407 /// reader.readNodeMap<QuotedStringReader>("label", labelMap); 408 /// reader.skipNodeMap<QuotedStringReader>("description"); 414 /// reader.skipNodeMap("description", desc); 409 415 /// 410 416 /// reader.readNodeMap("color", colorMap); … … 705 711 } 706 712 707 /// \brief Gives back the node by its id. 708 /// 709 /// It reads an id from the stream and gives back which node belongs to 710 /// it. It is possible only if there was read an "id" named node map. 711 Node readId(std::istream& is, Node) const { 712 return nodeset_reader.readId(is, Node()); 713 714 /// \brief Returns true if the reader can give back the items by its label. 715 /// 716 /// \brief Returns true if the reader can give back the items by its label. 717 bool isLabelReader() const { 718 return nodeset_reader.isLabelReader() && 719 undir_edgeset_reader.isLabelReader(); 720 } 721 722 /// \brief Gives back the node by its label. 723 /// 724 /// It reads an label from the stream and gives back which node belongs to 725 /// it. It is possible only if there was read an "label" named node map. 726 void readLabel(std::istream& is, Node& node) const { 727 return nodeset_reader.readLabel(is, node); 713 728 } 714 729 715 /// \brief Gives back the edge by its id.716 /// 717 /// It reads an idfrom the stream and gives back which edge belongs to718 /// it. It is possible only if there was read an " id" named edge map.719 Edge readId(std::istream& is, Edge) const {720 return undir_edgeset_reader.read Id(is, Edge());730 /// \brief Gives back the edge by its label. 731 /// 732 /// It reads an label from the stream and gives back which edge belongs to 733 /// it. It is possible only if there was read an "label" named edge map. 734 void readLabel(std::istream& is, Edge& edge) const { 735 return undir_edgeset_reader.readLabel(is, edge); 721 736 } 722 737 723 /// \brief Gives back the undirected edge by its id.724 /// 725 /// It reads an idfrom the stream and gives back which undirected edge726 /// belongs to it. It is possible only if there was read an " id" named738 /// \brief Gives back the undirected edge by its label. 739 /// 740 /// It reads an label from the stream and gives back which undirected edge 741 /// belongs to it. It is possible only if there was read an "label" named 727 742 /// edge map. 728 UndirEdge readId(std::istream& is, UndirEdge) const {729 return undir_edgeset_reader.read Id(is, UndirEdge());743 void readLabel(std::istream& is, UndirEdge& uedge) const { 744 return undir_edgeset_reader.readLabel(is, uedge); 730 745 } 731 746
Note: See TracChangeset
for help on using the changeset viewer.