2 Qanava - Graph drawing library for QT
3 Copyright (C) 2005 Benoit AUTHEMAN
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 //-----------------------------------------------------------------------------
21 // This file is a part of the Qanava software.
23 // \file laGraphVisitor.h
24 // \author Benoit Autheman (benoit@faktiss.net)
25 // \date 2004 February 15
26 //-----------------------------------------------------------------------------
29 #ifndef laGraphVisitor_h
30 #define laGraphVisitor_h
33 #include "../utl/utlConfig.h"
36 //-----------------------------------------------------------------------------
37 namespace qan
{ // ::qan
38 namespace la
{ // ::qan::la
44 //! Visitor for graph related data structures.
50 /*! \name Visit Methods Management *///----------------------------
55 virtual void visit( Graph
* graph
) = 0;
57 //! Visit a graph node.
58 virtual void visit( Node
* node
) = 0;
60 //! Visit a graph edge.
61 virtual void visit( Edge
* edge
) = 0;
63 //-----------------------------------------------------------------
68 //! Convert graph related data structure as neato formatted text.
72 class Neato
: public GraphVisitor
74 /*! \name Neato Constructor/Destructor *///------------------------
78 //! Neato default constructor.
81 //! Neato default destructor.
86 //! Neato empty private copy constructor.
87 Neato( const Neato
& visitor
) : GraphVisitor( visitor
) { }
89 //-----------------------------------------------------------------
93 /*! \name Visit Methods Management *///----------------------------
98 virtual void visit( Graph
* graph
);
100 //! Visit a graph node.
101 virtual void visit( Node
* node
);
103 //! Visit a graph edge.
104 virtual void visit( Edge
* edge
);
106 //-----------------------------------------------------------------
110 //-----------------------------------------------------------------------------
113 #endif // laGraphVisitor_h