Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

UmlDiagramGraph.h
Go to the documentation of this file.
1 
38 #pragma once
39 
40 #include <ogdf/basic/Graph.h>
41 #include <ogdf/basic/SList.h>
42 #include <ogdf/basic/basic.h>
43 
44 #include <iosfwd>
45 #include <string>
46 
47 namespace ogdf {
48 class UmlModelGraph;
49 
57  friend OGDF_EXPORT std::ostream& operator<<(std::ostream&, const UmlDiagramGraph&);
58 
59 public:
61  enum class UmlDiagramType {
62  classDiagram,
63  moduleDiagram,
64  sequenceDiagram,
65  collaborationDiagram,
66  componentDiagram,
67  unknownDiagram
68  };
69 
70 private:
73 
75  string m_diagramName;
76 
79 
84 
89 
94 
99 
104 
109 
110 public:
112  UmlDiagramGraph(const UmlModelGraph& umlModelGraph, UmlDiagramType diagramType,
113  const string& diagramName);
114 
116  ~UmlDiagramGraph();
117 
119  void addNodeWithGeometry(node umlNode, double x, double y, double w, double h);
120 
122  void addEdge(edge umlEdge);
123 
125  const string& getDiagramName() const { return m_diagramName; }
126 
128  const char* getDiagramTypeString() const;
129 
131  const SList<node>& getNodes() const { return m_containedNodes; }
132 
134  const SList<edge>& getEdges() const { return m_containedEdges; }
135 
137  const SList<double>& getX() const { return m_x; }
138 
140  const SList<double>& getY() const { return m_y; }
141 
143  const SList<double>& getWidth() const { return m_w; }
144 
146  const SList<double>& getHeight() const { return m_h; }
147 };
148 
149 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::UmlDiagramGraph::getY
const SList< double > & getY() const
Access to y-coordinates.
Definition: UmlDiagramGraph.h:140
ogdf::UmlDiagramGraph::getWidth
const SList< double > & getWidth() const
Access to width.
Definition: UmlDiagramGraph.h:143
Graph.h
Includes declaration of graph class.
ogdf::UmlDiagramGraph::m_x
SList< double > m_x
This list contains the x-coordinates of the nodes contained in the represented diagram.
Definition: UmlDiagramGraph.h:93
ogdf::UmlDiagramGraph::getX
const SList< double > & getX() const
Access to x-coordinates.
Definition: UmlDiagramGraph.h:137
ogdf::UmlDiagramGraph::m_diagramName
string m_diagramName
The name of the diagram.
Definition: UmlDiagramGraph.h:75
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:845
ogdf::UmlModelGraph
This class represents the complete UML Model in a graph-like data structure.
Definition: UmlModelGraph.h:44
ogdf::UmlDiagramGraph::getDiagramName
const string & getDiagramName() const
Returns the name of the diagram.
Definition: UmlDiagramGraph.h:125
ogdf::UmlDiagramGraph::m_diagramType
UmlDiagramType m_diagramType
The type of diagram.
Definition: UmlDiagramGraph.h:78
ogdf::UmlDiagramGraph::getEdges
const SList< edge > & getEdges() const
Access to contained edges.
Definition: UmlDiagramGraph.h:134
ogdf::UmlDiagramGraph::m_containedNodes
SList< node > m_containedNodes
This list holds pointer to the nodes contained in the represented diagram.
Definition: UmlDiagramGraph.h:83
SList.h
Declaration of singly linked lists and iterators.
ogdf::UmlDiagramGraph::getNodes
const SList< node > & getNodes() const
Access to contained nodes.
Definition: UmlDiagramGraph.h:131
ogdf::UmlDiagramGraph::UmlDiagramType
UmlDiagramType
This enum type represents the different diagram types of UML. *‍/.
Definition: UmlDiagramGraph.h:61
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::UmlDiagramGraph::m_containedEdges
SList< edge > m_containedEdges
This list holds pointer to the edges contained in the represented diagram.
Definition: UmlDiagramGraph.h:88
ogdf::UmlDiagramGraph::m_modelGraph
const UmlModelGraph & m_modelGraph
Reference to the model graph.
Definition: UmlDiagramGraph.h:72
ogdf::UmlDiagramGraph::m_y
SList< double > m_y
This list contains the y-coordinates of the nodes contained in the represented diagram.
Definition: UmlDiagramGraph.h:98
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::UmlDiagramGraph::m_w
SList< double > m_w
This list contains the width of the nodes contained in the represented diagram.
Definition: UmlDiagramGraph.h:103
ogdf::UmlDiagramGraph::getHeight
const SList< double > & getHeight() const
Access to height.
Definition: UmlDiagramGraph.h:146
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::UmlDiagramGraph
Contains the class UmlDiagramGraph which represents one particular diagram of the complete UML Model.
Definition: UmlDiagramGraph.h:56
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::UmlDiagramGraph::m_h
SList< double > m_h
This list contains the height of the nodes contained in the represented diagram.
Definition: UmlDiagramGraph.h:108