Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

GraphML.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/HashArray.h>
37 #include <string>
38 
39 namespace ogdf {
40 namespace graphml {
41 
42 enum class Attribute {
43  NodeLabel = 0,
44  EdgeLabel,
45 
46  X, Y, Z,
47  Width, Height,
48  Size, // Gephi compatibility (size = max(width, height)).
49  Shape,
50 
51  NodeStroke,
52  EdgeStroke,
54  NodeFill,
55  R, G, B, // Gephi compatibility (fill compounds).
56 
57  NodeWeight,
58  EdgeWeight,
59 
60  NodeType,
61  EdgeType,
62 
63  Template,
64 
65  EdgeArrow,
67  EdgeBends,
68 
69  Unknown // Has to be the last one!
70 };
71 
72 std::string toString(const Attribute &attr);
73 std::string toString(const Shape &shape);
74 std::string toString(const EdgeArrow &arrow);
75 std::string toString(const Graph::NodeType &type);
76 std::string toString(const Graph::EdgeType &type);
77 
78 Attribute toAttribute(const std::string &str);
79 Shape toShape(const std::string &str);
80 EdgeArrow toArrow(const std::string &str);
81 Graph::NodeType toNodeType(const std::string &str);
82 Graph::EdgeType toEdgeType(const std::string &str);
83 
84 }
85 }
Declaration and implementation of HashArray class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
std::string toString(const Attribute &attr)
EdgeArrow
Types for edge arrows.
Definition: graphics.h:142
Shape
Types for node shapes.
Definition: graphics.h:120
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:518
Includes declaration of graph class.
Shape toShape(const std::string &str)
Graph::NodeType toNodeType(const std::string &str)
Attribute toAttribute(const std::string &str)
EdgeArrow toArrow(const std::string &str)
The namespace for all OGDF objects.
Graph::EdgeType toEdgeType(const std::string &str)
NodeType
The type of nodes.
Definition: Graph_d.h:525