Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

UmlModelGraph.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/NodeArray.h>
36 #include <ogdf/basic/EdgeArray.h>
37 
38 namespace ogdf {
39 
42 
43 private:
45  string m_modelName;
46 
49 
54 
59 
60 public:
61 
63  UmlModelGraph();
64 
66  ~UmlModelGraph();
67 
69  void setModelName(const string &name) { m_modelName = name; }
70 
72  const string &getNodeLabel(node v) const { return m_nodeLabel[v]; }
73 
75  string &label(node v) { return m_nodeLabel[v]; }
76 
78  const Graph::EdgeType &type(edge e) const { return m_eType[e]; }
79 
81  Graph::EdgeType &type(edge e) { return m_eType[e]; }
82 
84  const Graph::NodeType &type(node v) const { return m_vType[v]; }
85 
87  Graph::NodeType &type(node v) { return m_vType[v]; }
88 
89 };
90 
92 std::ostream &operator<<(std::ostream &os, const UmlModelGraph &modelGraph);
93 
94 }
Graph::EdgeType & type(edge e)
Returns a reference to the type of the given edge.
Definition: UmlModelGraph.h:81
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void setModelName(const string &name)
Sets the name of the model.
Definition: UmlModelGraph.h:69
Declaration and implementation of EdgeArray class.
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:538
Graph::NodeType & type(node v)
Returns a reference to the type of the given node.
Definition: UmlModelGraph.h:87
Class for the representation of edges.
Definition: Graph_d.h:292
Class for the representation of nodes.
Definition: Graph_d.h:169
Declaration and implementation of NodeArray class.
NodeArray< string > m_nodeLabel
The label of the contained nodes.
Definition: UmlModelGraph.h:48
This class represents the complete UML Model in a graph-like data structure.
Definition: UmlModelGraph.h:41
string & label(node v)
Returns a reference to the label of the given node.
Definition: UmlModelGraph.h:75
const Graph::EdgeType & type(edge e) const
Returns a const reference to the type of the given edge.
Definition: UmlModelGraph.h:78
EdgeArray< Graph::EdgeType > m_eType
The types of the contained edges.
Definition: UmlModelGraph.h:53
string m_modelName
The name of the model.
Definition: UmlModelGraph.h:45
The namespace for all OGDF objects.
NodeType
The type of nodes.
Definition: Graph_d.h:545
const string & getNodeLabel(node v) const
Returns a const reference to the label of the given node.
Definition: UmlModelGraph.h:72
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:942
NodeArray< Graph::NodeType > m_vType
The types of the contained nodes.
Definition: UmlModelGraph.h:58
const Graph::NodeType & type(node v) const
Returns a const reference to the type of the given node.
Definition: UmlModelGraph.h:84