Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / fileformats / DinoUmlModelGraph.h
blob50a3db94983bfb666e0ddffa729c3e7b1c926b0d
1 /*
2 * $Revision: 2523 $
4 * last checkin:
5 * $Author: gutwenger $
6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
9 /** \file
10 * \brief Contains the class DinoUmlModelGraph which represents the
11 * complete UML Model in a graph like data structure.
13 * \author Dino Ahr
15 * \par License:
16 * This file is part of the Open Graph Drawing Framework (OGDF).
18 * \par
19 * Copyright (C)<br>
20 * See README.txt in the root directory of the OGDF installation for details.
22 * \par
23 * This program is free software; you can redistribute it and/or
24 * modify it under the terms of the GNU General Public License
25 * Version 2 or 3 as published by the Free Software Foundation;
26 * see the file LICENSE.txt included in the packaging of this file
27 * for details.
29 * \par
30 * This program is distributed in the hope that it will be useful,
31 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 * GNU General Public License for more details.
35 * \par
36 * You should have received a copy of the GNU General Public
37 * License along with this program; if not, write to the Free
38 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
39 * Boston, MA 02110-1301, USA.
41 * \see http://www.gnu.org/copyleft/gpl.html
42 ***************************************************************/
44 #ifdef _MSC_VER
45 #pragma once
46 #endif
48 #ifndef OGDF_DINO_UML_MODEL_GRAPH_H
49 #define OGDF_DINO_UML_MODEL_GRAPH_H
51 #include <ogdf/basic/NodeArray.h>
52 #include <ogdf/basic/EdgeArray.h>
53 #include <ogdf/basic/String.h>
55 namespace ogdf {
57 //---------------------------------------------------------
58 // D i n o U m l M o d e l G r a p h
59 //---------------------------------------------------------
60 /** This class represents the complete UML Model in a graph-
61 * like data structure.
63 class OGDF_EXPORT DinoUmlModelGraph : public Graph {
65 private:
67 /** The name of the model. */
68 String m_modelName;
70 /** The label of the contained nodes. */
71 NodeArray<String> m_nodeLabel;
73 /** The types of the contained edges.
74 * Types are association or generalization.
76 EdgeArray<Graph::EdgeType> m_eType;
78 /** The types of the contained nodes.
79 * Types are vertex, dummy, generalizationMerger
81 NodeArray<Graph::NodeType> m_vType;
83 public:
85 /** Constructor. */
86 DinoUmlModelGraph();
88 /** Destructor. */
89 ~DinoUmlModelGraph();
91 /** Sets the name of the model. */
92 void setModelName(const String &name) { m_modelName = name; }
94 /** Returns a const reference to the label of the given node. */
95 const String &getNodeLabel(node v) const { return m_nodeLabel[v]; }
97 /** Returns a reference to the label of the given node. */
98 String &labelNode(node v) { return m_nodeLabel[v]; }
100 /** Returns a const reference to the type of the given edge. */
101 const Graph::EdgeType &type(edge e) const { return m_eType[e]; }
103 /** Returns a reference to the type of the given edge. */
104 Graph::EdgeType &type(edge e) { return m_eType[e]; }
106 /** Returns a const reference to the type of the given node. */
107 const Graph::NodeType &type(node v) const { return m_vType[v]; }
109 /** Returns a reference to the type of the given node. */
110 Graph::NodeType &type(node v) { return m_vType[v]; }
112 }; // class DinoUmlModelGraph
114 /** Output operator for DinoUmlModelGraph. */
115 ostream &operator<<(ostream &os, const DinoUmlModelGraph &modelGraph);
117 } // end namespace ogdf
119 #endif