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/EdgeArray.h>
36 #include <ogdf/basic/NodeArray.h>
37 
38 namespace ogdf {
39 
42 private:
44  string m_modelName;
45 
48 
53 
58 
59 public:
61  UmlModelGraph();
62 
64  ~UmlModelGraph();
65 
67  void setModelName(const string& name) { m_modelName = name; }
68 
70  const string& getNodeLabel(node v) const { return m_nodeLabel[v]; }
71 
73  string& label(node v) { return m_nodeLabel[v]; }
74 
76  const Graph::EdgeType& type(edge e) const { return m_eType[e]; }
77 
79  Graph::EdgeType& type(edge e) { return m_eType[e]; }
80 
82  const Graph::NodeType& type(node v) const { return m_vType[v]; }
83 
85  Graph::NodeType& type(node v) { return m_vType[v]; }
86 };
87 
89 std::ostream& operator<<(std::ostream& os, const UmlModelGraph& modelGraph);
90 
91 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::UmlModelGraph::getNodeLabel
const string & getNodeLabel(node v) const
Returns a const reference to the label of the given node.
Definition: UmlModelGraph.h:70
ogdf::Graph::EdgeType
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:901
ogdf::UmlModelGraph::label
string & label(node v)
Returns a reference to the label of the given node.
Definition: UmlModelGraph.h:73
ogdf::UmlModelGraph
This class represents the complete UML Model in a graph-like data structure.
Definition: UmlModelGraph.h:41
ogdf::UmlModelGraph::setModelName
void setModelName(const string &name)
Sets the name of the model.
Definition: UmlModelGraph.h:67
ogdf::UmlModelGraph::type
const Graph::NodeType & type(node v) const
Returns a const reference to the type of the given node.
Definition: UmlModelGraph.h:82
ogdf::UmlModelGraph::m_nodeLabel
NodeArray< string > m_nodeLabel
The label of the contained nodes.
Definition: UmlModelGraph.h:47
ogdf::UmlModelGraph::m_vType
NodeArray< Graph::NodeType > m_vType
The types of the contained nodes.
Definition: UmlModelGraph.h:57
EdgeArray.h
Declaration and implementation of EdgeArray class.
ogdf::UmlModelGraph::type
Graph::NodeType & type(node v)
Returns a reference to the type of the given node.
Definition: UmlModelGraph.h:85
ogdf::operator<<
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:978
ogdf::UmlModelGraph::type
Graph::EdgeType & type(edge e)
Returns a reference to the type of the given edge.
Definition: UmlModelGraph.h:79
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::Graph::NodeType
NodeType
The type of nodes.
Definition: Graph_d.h:904
NodeArray.h
Declaration and implementation of NodeArray class.
ogdf::UmlModelGraph::m_modelName
string m_modelName
The name of the model.
Definition: UmlModelGraph.h:44
ogdf::UmlModelGraph::type
const Graph::EdgeType & type(edge e) const
Returns a const reference to the type of the given edge.
Definition: UmlModelGraph.h:76
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:52
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709