Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

GML.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 
40 namespace ogdf {
41 
42 namespace gml {
43 
44 enum class ObjectType {
45  IntValue,
48  ListBegin,
49  ListEnd,
50  Key,
51  Eof,
52  Error,
53 };
54 
55 enum class Key {
56  Id,
57  Label,
58  Creator,
59  Name,
60  Graph,
61  Version,
62  Directed,
63  Node,
64  Edge,
65  Graphics,
66  X,
67  Y,
68  Z,
69  W,
70  H,
71  Type,
72  Width,
73  Source,
74  Target,
75  Arrow,
76  Outline,
77  Point,
78  Bends,
80  SubGraph,
81  Fill,
82  FillBg,
83  Cluster,
84  Root,
85  Vertex,
86  Color,
87  Height,
88  Stipple,
89  Pattern,
90  LineWidth,
91  Template,
92  Weight, // Used for node weight and edge double weight
94  Unknown
95 };
96 
97 
98 std::string toString(const Key &attr);
99 std::string toString(const EdgeArrow &arrow);
100 std::string toString(const Graph::NodeType &type);
101 
102 Key toKey(const std::string &str);
103 EdgeArrow toArrow(const std::string &str);
104 Graph::NodeType toNodeType(const std::string &str);
105 
106 }
107 }
108 
109 // Implement hash for gml::Key so we can use it as a key in unordered_map.
110 namespace std {
111  template<>
112  struct hash<ogdf::gml::Key> {
113  std::size_t operator()(const ogdf::gml::Key& t) const { return size_t(t); }
114  };
115 }
Declaration and implementation of HashArray class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Graph::NodeType toNodeType(const std::string &str)
Key
Definition: GML.h:55
Definition: GML.h:110
EdgeArrow
Types for edge arrows.
Definition: graphics.h:186
EdgeArrow toArrow(const std::string &str)
std::string toString(const Key &attr)
ObjectType
Definition: GML.h:44
static uint32_t hash(uint32_t x)
Definition: Map.h:38
Includes declaration of graph class.
The namespace for all OGDF objects.
Key toKey(const std::string &str)
NodeType
The type of nodes.
Definition: Graph_d.h:545
std::size_t operator()(const ogdf::gml::Key &t) const
Definition: GML.h:113