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