6 * $Date: 2012-07-07 00:03:48 +0200 (Sa, 07. Jul 2012) $
7 ***************************************************************/
10 * \brief Contains the class DinoUmlDiagramGraph which represents one
11 * particular diagram of the complete UML Model.
13 * Each diagram refers to the node and edge information of
14 * DinoUmlModelGraph. Essentially a diagram contains selected nodes
15 * and edges of the model provides with additional geometric
21 * This file is part of the Open Graph Drawing Framework (OGDF).
25 * See README.txt in the root directory of the OGDF installation for details.
28 * This program is free software; you can redistribute it and/or
29 * modify it under the terms of the GNU General Public License
30 * Version 2 or 3 as published by the Free Software Foundation;
31 * see the file LICENSE.txt included in the packaging of this file
35 * This program is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
41 * You should have received a copy of the GNU General Public
42 * License along with this program; if not, write to the Free
43 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
44 * Boston, MA 02110-1301, USA.
46 * \see http://www.gnu.org/copyleft/gpl.html
47 ***************************************************************/
53 #ifndef OGDF_DINO_UML_DIAGRAM_GRAPH_H
54 #define OGDF_DINO_UML_DIAGRAM_GRAPH_H
56 #include <ogdf/fileformats/DinoUmlModelGraph.h>
57 #include <ogdf/basic/String.h>
58 #include <ogdf/basic/SList.h>
62 //---------------------------------------------------------
63 // D i n o U m l D i a g r a m G r a p h
64 //---------------------------------------------------------
65 /** Contains the class DinoUmlDiagramGraph which represents one
66 * particular diagram of the complete UML Model. Each diagram refers
67 * to the node and edge information of DinoUmlModelGraph. Essentially
68 * a diagram contains selected nodes and edges of the model provides
69 * with additional geometric information.
71 class OGDF_EXPORT DinoUmlDiagramGraph
{
73 friend ostream
&operator<<(ostream
&, const DinoUmlDiagramGraph
&);
77 //---------------------------------------------------------
78 // U m l D i a g r a m T y p e
79 //---------------------------------------------------------
80 /** This enum type represents the different diagram types of UML.
90 }; // enum UmlDiagramType
94 /** Reference to the model graph. */
95 const DinoUmlModelGraph
&m_modelGraph
;
97 /** The name of the diagram. */
100 /** The type of diagram. */
101 UmlDiagramType m_diagramType
;
103 /** This list holds pointer to the nodes contained in
104 * the represented diagram.
106 SList
<NodeElement
*> m_containedNodes
;
108 /** This list holds pointer to the edges contained in
109 * the represented diagram.
111 SList
<EdgeElement
*> m_containedEdges
;
113 /** This list contains the x-coordinates of the nodes
114 * contained in the represented diagram.
118 /** This list contains the y-coordinates of the nodes
119 * contained in the represented diagram.
123 /** This list contains the width of the nodes
124 * contained in the represented diagram.
128 /** This list contains the height of the nodes
129 * contained in the represented diagram.
136 DinoUmlDiagramGraph(const DinoUmlModelGraph
¨ModelGraph
,
137 UmlDiagramType diagramType
,
141 ~DinoUmlDiagramGraph();
143 /** Adds a node with the given coordinates. */
144 void addNodeWithGeometry(NodeElement
* node
,
145 double x
, double y
, double w
, double h
);
148 void addEdge(EdgeElement
* edge
);
150 /** Returns the name of the diagram. */
151 String
getDiagramName() const{
152 return m_diagramName
;
155 /** Returns the type of the diagram as string. */
156 String
getDiagramTypeString() const;
158 /** Access to contained nodes. */
159 const SList
<NodeElement
*> &getNodes() const{
160 return m_containedNodes
;
163 /** Access to contained edges. */
164 const SList
<EdgeElement
*> &getEdges() const{
165 return m_containedEdges
;
168 /** Access to x-coordinates. */
169 const SList
<double> &getX() const{
173 /** Access to y-coordinates. */
174 const SList
<double> &getY() const{
178 /** Access to width. */
179 const SList
<double> &getWidth() const{
183 /** Access to height. */
184 const SList
<double> &getHeight() const{
188 }; // class DinoUmlDiagramGraph
190 /** Output operator for DinoUmlDiagramGraph. */
191 ostream
&operator<<(ostream
&os
, const DinoUmlDiagramGraph
&diagramGraph
);
194 } // end namespace ogdf