Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

UmlModelGraph.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/basic.h>
37 
38 #include <iosfwd>
39 #include <string>
40 
41 namespace ogdf {
42 
45 private:
47  string m_modelName;
48 
51 
56 
61 
62 public:
64  UmlModelGraph();
65 
67  ~UmlModelGraph();
68 
70  void setModelName(const string& name) { m_modelName = name; }
71 
73  const string& getNodeLabel(node v) const { return m_nodeLabel[v]; }
74 
76  string& label(node v) { return m_nodeLabel[v]; }
77 
79  const Graph::EdgeType& type(edge e) const { return m_eType[e]; }
80 
82  Graph::EdgeType& type(edge e) { return m_eType[e]; }
83 
85  const Graph::NodeType& type(node v) const { return m_vType[v]; }
86 
88  Graph::NodeType& type(node v) { return m_vType[v]; }
89 };
90 
92 std::ostream& operator<<(std::ostream& os, const UmlModelGraph& modelGraph);
93 
94 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::UmlModelGraph::getNodeLabel
const string & getNodeLabel(node v) const
Returns a const reference to the label of the given node.
Definition: UmlModelGraph.h:73
ogdf::Graph::EdgeType
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:909
ogdf::UmlModelGraph::label
string & label(node v)
Returns a reference to the label of the given node.
Definition: UmlModelGraph.h:76
ogdf::UmlModelGraph
This class represents the complete UML Model in a graph-like data structure.
Definition: UmlModelGraph.h:44
ogdf::UmlModelGraph::setModelName
void setModelName(const string &name)
Sets the name of the model.
Definition: UmlModelGraph.h:70
ogdf::UmlModelGraph::type
const Graph::NodeType & type(node v) const
Returns a const reference to the type of the given node.
Definition: UmlModelGraph.h:85
ogdf::UmlModelGraph::m_nodeLabel
NodeArray< string > m_nodeLabel
The label of the contained nodes.
Definition: UmlModelGraph.h:50
ogdf::UmlModelGraph::m_vType
NodeArray< Graph::NodeType > m_vType
The types of the contained nodes.
Definition: UmlModelGraph.h:60
ogdf::UmlModelGraph::type
Graph::NodeType & type(node v)
Returns a reference to the type of the given node.
Definition: UmlModelGraph.h:88
ogdf::operator<<
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:983
ogdf::UmlModelGraph::type
Graph::EdgeType & type(edge e)
Returns a reference to the type of the given edge.
Definition: UmlModelGraph.h:82
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::Graph::NodeType
NodeType
The type of nodes.
Definition: Graph_d.h:912
basic.h
Basic declarations, included by all source files.
ogdf::UmlModelGraph::m_modelName
string m_modelName
The name of the model.
Definition: UmlModelGraph.h:47
ogdf::UmlModelGraph::type
const Graph::EdgeType & type(edge e) const
Returns a const reference to the type of the given edge.
Definition: UmlModelGraph.h:79
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::UmlModelGraph::m_eType
EdgeArray< Graph::EdgeType > m_eType
The types of the contained edges.
Definition: UmlModelGraph.h:55
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716