Loading...
Searching...
No Matches
BoxIterator.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib 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 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file BoxIterator.h
22
23 \brief This class defines a commun interface to represents a graph
24 iterator class. The main diferency to anothers iterators is
25 the possibility to iterate over the edges or vertexs from a
26 graph.
27
28 The box strategy is used to select a restrict area in a graph
29 and a iterator will be create accessing all elements inside
30 this area.
31*/
32
33#ifndef __TERRALIB_GRAPH_INTERNAL_BOXITERATOR_H
34#define __TERRALIB_GRAPH_INTERNAL_BOXITERATOR_H
35
36// Terralib Includes
37#include "../Config.h"
38#include "AbstractIterator.h"
39
40// STL Includes
41#include <vector>
42
43namespace te
44{
45 namespace gm
46 {
47 class Envelope;
48 }
49
50 namespace graph
51 {
52 //forward declarations
53 class Edge;
54 class Vertex;
55
56 /*!
57 \class BoxIterator
58
59 \brief This class defines a commun interface to represents a graph
60 iterator class. The main diferency to anothers iterators is
61 the possibility to iterate over the edges or vertexs from a
62 graph.
63
64 The box strategy is used select a restrict area in a graph
65 and a iterator will be create accessing all elements inside
66 this area.
67
68 \sa AbstractIterator
69 */
70
72 {
73 public:
74
75 /*!
76 \brief Default constructor.
77
78 \param g Pointer to a valid graph implementation
79
80 */
82
83 /*!
84 \brief Constructor.
85
86 \param g Pointer to a valid graph implementation
87
88 \param e Object used to define a restrict area
89
90 */
92
93 /*! \brief Virtual destructor. */
94 virtual ~BoxIterator();
95
96
97 /** @name Vertex Access Methods
98 * Method used to access vertex elements from a graph.
99 */
100 //@{
101
102 /*!
103 \brief It returns a pointer to the first vertex element of a graph
104
105 \return A valid vertex point if the element was found and a null pointer in other case.
106 */
108
109 /*!
110 \brief It returns a pointer to the first edge element of a graph
111
112 \return A valid edge point if the element was found and a null pointer in other case.
113 */
115
116 protected:
117
118 te::gm::Envelope* m_extent; //|< Attribute to define the extent clause used as query by the iterator
119 };
120
121 } // end namespace graph
122} // end namespace te
123
124#endif // __TERRALIB_GRAPH_INTERNAL_BOXITERATOR_H
This class defines a commun interface to represents a graph iterator class. The main diferency to ano...
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Abstract class used to define the main functions of graph struct. All graph implementations must used...
Definition: AbstractGraph.h:56
This class defines a commun interface to represents a graph iterator class. The main diferency to ano...
This class defines a commun interface to represents a graph iterator class. The main diferency to ano...
Definition: BoxIterator.h:72
virtual te::graph::Edge * getFirstEdge()
It returns a pointer to the first edge element of a graph.
BoxIterator(te::graph::AbstractGraph *g)
Default constructor.
te::gm::Envelope * m_extent
Definition: BoxIterator.h:118
virtual ~BoxIterator()
Virtual destructor.
BoxIterator(te::graph::AbstractGraph *g, te::gm::Envelope *e)
Constructor.
virtual te::graph::Vertex * getFirstVertex()
It returns a pointer to the first vertex element of a graph.
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
Definition: Edge.h:59
From the point of view of graph theory, vertices are treated as featureless and indivisible objects,...
Definition: Vertex.h:69
TerraLib.
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:178