Open
Graph Drawing
Framework

 v.2012.05
 

DinoUmlDiagramGraph.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00048 #ifdef _MSC_VER
00049 #pragma once
00050 #endif
00051 
00052 #ifndef OGDF_DINO_UML_DIAGRAM_GRAPH_H
00053 #define OGDF_DINO_UML_DIAGRAM_GRAPH_H
00054 
00055 #include <ogdf/fileformats/DinoUmlModelGraph.h>
00056 #include <ogdf/basic/String.h>
00057 #include <ogdf/basic/SList.h>
00058 
00059 namespace ogdf {
00060 
00061     //---------------------------------------------------------
00062     // D i n o U m l D i a g r a m G r a p h
00063     //---------------------------------------------------------
00070     class OGDF_EXPORT DinoUmlDiagramGraph {
00071 
00072       friend ostream &operator<<(ostream&, const DinoUmlDiagramGraph &);
00073 
00074     public:
00075 
00076         //---------------------------------------------------------
00077         // U m l D i a g r a m T y p e
00078         //---------------------------------------------------------
00081         enum UmlDiagramType{
00082             classDiagram,
00083             moduleDiagram,
00084             sequenceDiagram,
00085             collaborationDiagram,
00086             componentDiagram,
00087             unknownDiagram
00088 
00089         }; // enum UmlDiagramType 
00090 
00091     private:
00092 
00094         const DinoUmlModelGraph &m_modelGraph;
00095 
00097         String m_diagramName;
00098 
00100         UmlDiagramType m_diagramType;
00101 
00105         SList<NodeElement*> m_containedNodes;
00106 
00110         SList<EdgeElement*> m_containedEdges;
00111 
00115         SList<double> m_x;
00116 
00120         SList<double> m_y;
00121 
00125         SList<double> m_w;
00126 
00130         SList<double> m_h;
00131 
00132     public:
00133 
00135         DinoUmlDiagramGraph(const DinoUmlModelGraph &umlModelGraph,
00136                             UmlDiagramType diagramType,
00137                             String diagramName);
00138 
00140         ~DinoUmlDiagramGraph();
00141 
00143         void addNodeWithGeometry(NodeElement* node, 
00144                                  double x, double y, double w, double h);
00145 
00147         void addEdge(EdgeElement* edge);
00148 
00150         String getDiagramName() const{
00151             return m_diagramName;
00152         }
00153 
00155         String getDiagramTypeString() const;
00156 
00158         const SList<NodeElement*> &getNodes() const{
00159             return m_containedNodes;
00160         }
00161 
00163         const SList<EdgeElement*> &getEdges() const{
00164             return m_containedEdges;
00165         }
00166 
00168         const SList<double> &getX() const{
00169             return m_x;
00170         }
00171 
00173         const SList<double> &getY() const{
00174             return m_y;
00175         }
00176 
00178         const SList<double> &getWidth() const{
00179             return m_w;
00180         }
00181 
00183         const SList<double> &getHeight() const{
00184             return m_h;
00185         }
00186 
00187     }; // class DinoUmlDiagramGraph
00188 
00190     ostream &operator<<(ostream &os, const DinoUmlDiagramGraph &diagramGraph);
00191 
00192 
00193 } // end namespace ogdf
00194 
00195 #endif