Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

UmlDiagramGraph.h
Go to the documentation of this file.
1 
38 #pragma once
39 
40 #include <ogdf/uml/UmlModelGraph.h>
41 #include <ogdf/basic/SList.h>
42 
43 
44 namespace ogdf {
45 
53 
54  friend OGDF_EXPORT std::ostream &operator<<(std::ostream&, const UmlDiagramGraph &);
55 
56 public:
58  enum class UmlDiagramType{
59  classDiagram,
60  moduleDiagram,
61  sequenceDiagram,
62  collaborationDiagram,
63  componentDiagram,
64  unknownDiagram
65  };
66 
67 private:
70 
72  string m_diagramName;
73 
76 
81 
86 
91 
96 
101 
106 
107 public:
108 
110  UmlDiagramGraph(const UmlModelGraph &umlModelGraph,
111  UmlDiagramType diagramType,
112  const string &diagramName);
113 
115  ~UmlDiagramGraph();
116 
118  void addNodeWithGeometry(node umlNode, double x, double y, double w, double h);
119 
121  void addEdge(edge umlEdge);
122 
124  const string &getDiagramName() const{
125  return m_diagramName;
126  }
127 
129  const char *getDiagramTypeString() const;
130 
132  const SList<node> &getNodes() const{
133  return m_containedNodes;
134  }
135 
137  const SList<edge> &getEdges() const{
138  return m_containedEdges;
139  }
140 
142  const SList<double> &getX() const{
143  return m_x;
144  }
145 
147  const SList<double> &getY() const{
148  return m_y;
149  }
150 
152  const SList<double> &getWidth() const{
153  return m_w;
154  }
155 
157  const SList<double> &getHeight() const{
158  return m_h;
159  }
160 
161 };
162 
163 }
Declaration of singly linked lists and iterators.
const SList< node > & getNodes() const
Access to contained nodes.
Contains the class UmlDiagramGraph which represents one particular diagram of the complete UML Model...
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
UmlDiagramType m_diagramType
The type of diagram.
SList< double > m_w
This list contains the width of the nodes contained in the represented diagram.
UmlDiagramType
This enum type represents the different diagram types of UML. */.
Singly linked lists (maintaining the length of the list).
Definition: SList.h:773
const SList< double > & getHeight() const
Access to height.
const UmlModelGraph & m_modelGraph
Reference to the model graph.
string m_diagramName
The name of the diagram.
SList< double > m_h
This list contains the height of the nodes contained in the represented diagram.
SList< double > m_x
This list contains the x-coordinates of the nodes contained in the represented diagram.
Class for the representation of edges.
Definition: Graph_d.h:292
Class for the representation of nodes.
Definition: Graph_d.h:169
This class represents the complete UML Model in a graph-like data structure.
Definition: UmlModelGraph.h:41
const SList< double > & getY() const
Access to y-coordinates.
const string & getDiagramName() const
Returns the name of the diagram.
const SList< double > & getX() const
Access to x-coordinates.
The namespace for all OGDF objects.
SList< double > m_y
This list contains the y-coordinates of the nodes contained in the represented diagram.
SList< edge > m_containedEdges
This list holds pointer to the edges contained in the represented diagram.
const SList< double > & getWidth() const
Access to width.
const SList< edge > & getEdges() const
Access to contained edges.
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:942
SList< node > m_containedNodes
This list holds pointer to the nodes contained in the represented diagram.
Contains the class UmlModelGraph which represents the complete UML Model in a graph like data structu...