Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
38 #include <string>
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 }
HashArray.h
Declaration and implementation of HashArray class.
ogdf::gml::Key::Generalization
@ Generalization
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
GraphAttributes.h
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Graph.h
Includes declaration of graph class.
ogdf::gml::Key::Graphics
@ Graphics
ogdf::gml::Key::Z
@ Z
ogdf::gml::toNodeType
Graph::NodeType toNodeType(const std::string &str)
ogdf::gml::Key::Stipple
@ Stipple
ogdf::gml::Key::Type
@ Type
ogdf::gml::Key::Version
@ Version
ogdf::gml::Key::Color
@ Color
ogdf::gml::Key
Key
Definition: GML.h:55
ogdf::gml::Key::Node
@ Node
ogdf::gml::ObjectType::ListBegin
@ ListBegin
ogdf::gml::ObjectType::IntValue
@ IntValue
ogdf::gml::Key::Weight
@ Weight
ogdf::gml::Key::Edge
@ Edge
ogdf::gml::Key::Template
@ Template
ogdf::gml::Key::Outline
@ Outline
ogdf::gml::toString
std::string toString(const Key &attr)
ogdf::gml::Key::Y
@ Y
ogdf::gml::Key::Target
@ Target
ogdf::gml::Key::Name
@ Name
ogdf::gml::Key::Creator
@ Creator
ogdf::gml::Key::H
@ H
ogdf::gml::ObjectType
ObjectType
Definition: GML.h:44
ogdf::gml::Key::Root
@ Root
std::hash< ogdf::gml::Key >::operator()
std::size_t operator()(const ogdf::gml::Key &t) const
Definition: GML.h:113
ogdf::gml::ObjectType::StringValue
@ StringValue
backward::Color::type
type
Definition: backward.hpp:1716
ogdf::gml::Key::Graph
@ Graph
ogdf::gml::Key::Bends
@ Bends
ogdf::Graph::NodeType
NodeType
The type of nodes.
Definition: Graph_d.h:904
ogdf::EdgeArrow
EdgeArrow
Types for edge arrows.
Definition: graphics.h:141
ogdf::gml::ObjectType::ListEnd
@ ListEnd
ogdf::gml::Key::Cluster
@ Cluster
ogdf::gml::Key::EdgeIntWeight
@ EdgeIntWeight
ogdf::gml::Key::Unknown
@ Unknown
ogdf::gml::Key::Fill
@ Fill
ogdf::gml::Key::Height
@ Height
ogdf::gml::ObjectType::Eof
@ Eof
std
Definition: GML.h:110
ogdf::gml::Key::LineWidth
@ LineWidth
ogdf::gml::ObjectType::Key
@ Key
ogdf::gml::Key::Point
@ Point
ogdf::gml::Key::Directed
@ Directed
ogdf::gml::Key::X
@ X
ogdf::gml::ObjectType::Error
@ Error
ogdf::gml::toArrow
EdgeArrow toArrow(const std::string &str)
ogdf::gml::Key::Vertex
@ Vertex
ogdf::gml::Key::Label
@ Label
ogdf::gml::Key::Pattern
@ Pattern
ogdf::gml::Key::Source
@ Source
ogdf::gml::Key::Width
@ Width
Minisat::Internal::hash
static uint32_t hash(uint32_t x)
Definition: Map.h:38
ogdf::gml::ObjectType::DoubleValue
@ DoubleValue
ogdf::gml::Key::FillBg
@ FillBg
ogdf::gml::Key::W
@ W
ogdf::gml::Key::Arrow
@ Arrow
ogdf::gml::toKey
Key toKey(const std::string &str)
ogdf::gml::Key::Id
@ Id
ogdf::gml::Key::SubGraph
@ SubGraph