6 * $Date: 2012-07-07 17:14:54 +0200 (Sa, 07. Jul 2012) $
7 ***************************************************************/
10 * \brief Implementation of the class DinoUmlModelGraph
15 * This file is part of the Open Graph Drawing Framework (OGDF).
19 * See README.txt in the root directory of the OGDF installation for details.
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * Version 2 or 3 as published by the Free Software Foundation;
25 * see the file LICENSE.txt included in the packaging of this file
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
35 * You should have received a copy of the GNU General Public
36 * License along with this program; if not, write to the Free
37 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
38 * Boston, MA 02110-1301, USA.
40 * \see http://www.gnu.org/copyleft/gpl.html
41 ***************************************************************/
44 #include <ogdf/fileformats/DinoUmlModelGraph.h>
50 // C o n s t r u c t o r
52 DinoUmlModelGraph::DinoUmlModelGraph(){
55 m_nodeLabel
.init(*this);
56 m_eType
.init(*this,Graph::association
);
57 m_vType
.init(*this,Graph::vertex
);
62 // D e s t r u c t o r
64 DinoUmlModelGraph::~DinoUmlModelGraph(){
70 // o u t p u t O p e r a t o r for DinoUmlModelGraph
72 ostream
&operator<<(ostream
&os
, const DinoUmlModelGraph
&modelGraph
)
75 os
<< "\n--- UmlModelGraph ---\n" << endl
;
81 os
<< "Classes/Interfaces:\n" << endl
;
82 forall_nodes(v
,modelGraph
) {
83 os
<< "\t" << modelGraph
.getNodeLabel(v
) << endl
;
88 os
<< "\nRelations:\n" << endl
;
89 forall_edges(e
,modelGraph
) {
92 if (modelGraph
.type(e
) == Graph::association
){
93 os
<< "Association between ";
95 if (modelGraph
.type(e
) == Graph::generalization
){
96 os
<< "Generalization between ";
98 if (modelGraph
.type(e
) == Graph::dependency
){
99 os
<< "Dependency between ";
102 os
<< modelGraph
.getNodeLabel(e
->source()) << " and "
103 << modelGraph
.getNodeLabel(e
->target()) << endl
;