IdMap<ListUGraph, Node> nodeLabelMap;
writer.writeNodeMap("label", nodeLabelMap);
writer.writeNodeMap("coords", coords);
writer.writeNodeMap("color", colorMap);
DescriptorMap<ListGraph, Edge, ListGraph::EdgeMap<int> >
edgeDescMap(graph);
writer.writeUEdgeMap("descriptor", edgeDescMap);
writer.writeUEdgeMap("weight", weightMap);
writer.writeUEdgeMap("label", labelMap);
The EdgeMap handling is just a syntactical sugar. It writes two undirected edge map with '+' and '-' prefix in the name.
writer.writeNode("source", sourceNode);
writer.writeNode("target", targetNode);
writer.writeUEdge("observed", uEdge);
|
Public Member Functions |
| UGraphWriter (std::ostream &_os, const Graph &_graph) |
| Construct a new UGraphWriter.
|
| UGraphWriter (const std::string &_filename, const Graph &_graph) |
| Construct a new UGraphWriter.
|
| UGraphWriter (LemonWriter &_writer, const Graph &_graph) |
| Construct a new UGraphWriter.
|
| ~UGraphWriter () |
| Destruct the graph writer.
|
template<typename Map> |
UGraphWriter & | writeNodeMap (std::string name, const Map &map) |
| This function issues a new node map writing command to the writer.
|
template<typename Writer, typename Map> |
UGraphWriter & | writeNodeMap (std::string name, const Map &map, const Writer &writer=Writer()) |
| This function issues a new node map writing command to the writer.
|
template<typename Map> |
UGraphWriter & | writeEdgeMap (std::string name, const Map &map) |
| This function issues a new edge map writing command to the writer.
|
template<typename Writer, typename Map> |
UGraphWriter & | writeEdgeMap (std::string name, const Map &map, const Writer &writer=Writer()) |
| This function issues a new edge map writing command to the writer.
|
template<typename Map> |
UGraphWriter & | writeUEdgeMap (std::string name, const Map &map) |
| Issue a new undirected edge map writing command to the writer.
|
template<typename Writer, typename Map> |
UGraphWriter & | writeUEdgeMap (std::string name, const Map &map, const Writer &writer=Writer()) |
| Issue a new undirected edge map writing command to the writer.
|
UGraphWriter & | writeNode (std::string name, const Node &node) |
| Issue a new labeled node writer to the writer.
|
UGraphWriter & | writeEdge (std::string name, const Edge &edge) |
| Issue a new labeled edge writer to the writer.
|
UGraphWriter & | writeUEdge (std::string name, const UEdge &edge) |
| Issue a new labeled undirected edge writing command to the writer.
|
template<typename Value> |
UGraphWriter & | writeAttribute (std::string name, const Value &value) |
| Issue a new attribute writing command.
|
template<typename Writer, typename Value> |
UGraphWriter & | writeAttribute (std::string name, const Value &value, const Writer &writer) |
| Issue a new attribute writing command.
|
| operator LemonWriter & () |
| Conversion operator to LemonWriter.
|
void | run () |
| Executes the writing commands.
|
void | writeLabel (std::ostream &os, const Node &item) const |
| Write the label of the given node.
|
void | writeLabel (std::ostream &os, const Edge &item) const |
| Write the label of the given edge.
|
void | writeLabel (std::ostream &os, const UEdge &item) const |
| Write the label of the given undirected edge.
|