(empty message)
[qanava.git] / src / la / laGraphVisitor.h
blob3e3a46b30315589845833a02ba6bec38844dc3b8
1 /*
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
40 class Node;
41 class Edge;
42 class Graph;
44 //! Visitor for graph related data structures.
45 /*!
46 \nosubgrouping
48 class GraphVisitor
50 /*! \name Visit Methods Management *///----------------------------
51 //@{
52 public:
54 //! Visit a graph.
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;
62 //@}
63 //-----------------------------------------------------------------
68 //! Convert graph related data structure as neato formatted text.
69 /*!
70 \nosubgrouping
72 class Neato : public GraphVisitor
74 /*! \name Neato Constructor/Destructor *///------------------------
75 //@{
76 public:
78 //! Neato default constructor.
79 Neato( );
81 //! Neato default destructor.
82 virtual ~Neato( );
84 private:
86 //! Neato empty private copy constructor.
87 Neato( const Neato& visitor ) : GraphVisitor( visitor ) { }
88 //@}
89 //-----------------------------------------------------------------
93 /*! \name Visit Methods Management *///----------------------------
94 //@{
95 public:
97 //! Visit a graph.
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 );
105 //@}
106 //-----------------------------------------------------------------
108 } // ::qan::la
109 } // ::qan
110 //-----------------------------------------------------------------------------
113 #endif // laGraphVisitor_h