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/SList.h>
41 #include <ogdf/uml/UmlModelGraph.h>
42 
43 namespace ogdf {
44 
52  friend OGDF_EXPORT std::ostream& operator<<(std::ostream&, const UmlDiagramGraph&);
53 
54 public:
56  enum class UmlDiagramType {
57  classDiagram,
58  moduleDiagram,
59  sequenceDiagram,
60  collaborationDiagram,
61  componentDiagram,
62  unknownDiagram
63  };
64 
65 private:
68 
70  string m_diagramName;
71 
74 
79 
84 
89 
94 
99 
104 
105 public:
107  UmlDiagramGraph(const UmlModelGraph& umlModelGraph, UmlDiagramType diagramType,
108  const string& diagramName);
109 
111  ~UmlDiagramGraph();
112 
114  void addNodeWithGeometry(node umlNode, double x, double y, double w, double h);
115 
117  void addEdge(edge umlEdge);
118 
120  const string& getDiagramName() const { return m_diagramName; }
121 
123  const char* getDiagramTypeString() const;
124 
126  const SList<node>& getNodes() const { return m_containedNodes; }
127 
129  const SList<edge>& getEdges() const { return m_containedEdges; }
130 
132  const SList<double>& getX() const { return m_x; }
133 
135  const SList<double>& getY() const { return m_y; }
136 
138  const SList<double>& getWidth() const { return m_w; }
139 
141  const SList<double>& getHeight() const { return m_h; }
142 };
143 
144 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::UmlDiagramGraph::getY
const SList< double > & getY() const
Access to y-coordinates.
Definition: UmlDiagramGraph.h:135
ogdf::UmlDiagramGraph::getWidth
const SList< double > & getWidth() const
Access to width.
Definition: UmlDiagramGraph.h:138
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:88
ogdf::UmlDiagramGraph::getX
const SList< double > & getX() const
Access to x-coordinates.
Definition: UmlDiagramGraph.h:132
ogdf::UmlDiagramGraph::m_diagramName
string m_diagramName
The name of the diagram.
Definition: UmlDiagramGraph.h:70
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:833
ogdf::UmlModelGraph
This class represents the complete UML Model in a graph-like data structure.
Definition: UmlModelGraph.h:41
ogdf::UmlDiagramGraph::getDiagramName
const string & getDiagramName() const
Returns the name of the diagram.
Definition: UmlDiagramGraph.h:120
ogdf::UmlDiagramGraph::m_diagramType
UmlDiagramType m_diagramType
The type of diagram.
Definition: UmlDiagramGraph.h:73
ogdf::UmlDiagramGraph::getEdges
const SList< edge > & getEdges() const
Access to contained edges.
Definition: UmlDiagramGraph.h:129
UmlModelGraph.h
Contains the class UmlModelGraph which represents the complete UML Model in a graph like data structu...
ogdf::UmlDiagramGraph::m_containedNodes
SList< node > m_containedNodes
This list holds pointer to the nodes contained in the represented diagram.
Definition: UmlDiagramGraph.h:78
SList.h
Declaration of singly linked lists and iterators.
ogdf::UmlDiagramGraph::getNodes
const SList< node > & getNodes() const
Access to contained nodes.
Definition: UmlDiagramGraph.h:126
ogdf::UmlDiagramGraph::UmlDiagramType
UmlDiagramType
This enum type represents the different diagram types of UML. *‍/.
Definition: UmlDiagramGraph.h:56
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::UmlDiagramGraph::m_containedEdges
SList< edge > m_containedEdges
This list holds pointer to the edges contained in the represented diagram.
Definition: UmlDiagramGraph.h:83
ogdf::UmlDiagramGraph::m_modelGraph
const UmlModelGraph & m_modelGraph
Reference to the model graph.
Definition: UmlDiagramGraph.h:67
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:93
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:98
ogdf::UmlDiagramGraph::getHeight
const SList< double > & getHeight() const
Access to height.
Definition: UmlDiagramGraph.h:141
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::UmlDiagramGraph
Contains the class UmlDiagramGraph which represents one particular diagram of the complete UML Model.
Definition: UmlDiagramGraph.h:51
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::UmlDiagramGraph::m_h
SList< double > m_h
This list contains the height of the nodes contained in the represented diagram.
Definition: UmlDiagramGraph.h:103