Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
41namespace ogdf {
42
45private:
48
51
56
61
62public:
65
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
92std::ostream& operator<<(std::ostream& os, const UmlModelGraph& modelGraph);
93
94}
Includes declaration of graph class.
Basic declarations, included by all source files.
Class for the representation of edges.
Definition Graph_d.h:364
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
NodeType
The type of nodes.
Definition Graph_d.h:909
EdgeType
The type of edges (only used in derived classes).
Definition Graph_d.h:906
Class for the representation of nodes.
Definition Graph_d.h:241
This class represents the complete UML Model in a graph-like data structure.
void setModelName(const string &name)
Sets the name of the model.
NodeArray< string > m_nodeLabel
The label of the contained nodes.
~UmlModelGraph()
Destructor.
const Graph::EdgeType & type(edge e) const
Returns a const reference to the type of the given edge.
EdgeArray< Graph::EdgeType > m_eType
The types of the contained edges.
string m_modelName
The name of the model.
const Graph::NodeType & type(node v) const
Returns a const reference to the type of the given node.
NodeArray< Graph::NodeType > m_vType
The types of the contained nodes.
Graph::EdgeType & type(edge e)
Returns a reference to the type of the given edge.
string & label(node v)
Returns a reference to the label of the given node.
const string & getNodeLabel(node v) const
Returns a const reference to the label of the given node.
UmlModelGraph()
Constructor.
Graph::NodeType & type(node v)
Returns a reference to the type of the given node.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition Array.h:983