SortBy.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 SortBy.h
22 
23  \brief It represents a sort by expression.
24  */
25 
26 #ifndef __TERRALIB_FE_INTERNAL_SORTBY_H
27 #define __TERRALIB_FE_INTERNAL_SORTBY_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // STL
33 #include <vector>
34 
35 namespace te
36 {
37  namespace fe
38  {
39 // Forward declaration
40  class SortProperty;
41 
42  /*!
43  \class SortBy
44 
45  \brief It represents a sort by expression.
46 
47  \sa SortProperty
48  */
50  {
51  public:
52 
53  /** @name Initializer Methods
54  * Methods related to instantiation and destruction.
55  */
56  //@{
57 
58  /*! \brief It initializes a new SortBy. */
59  SortBy();
60 
61  /*! \brief Destructor. */
62  ~SortBy();
63 
64  //@}
65 
66  /** @name Accessor methods
67  * Methods used to get or set properties.
68  */
69  //@{
70 
71  /*!
72  \brief It returns the number of sort expressions.
73 
74  \return The number of sort expressions.
75  */
76  std::size_t size() const;
77 
78  /*!
79  \brief It adds the property to the sort list.
80 
81  \param p The property to be added to the sort list.
82 
83  \note The SortBy object will take the ownership of the property. So, you must not free it.
84  */
85  void push_back(SortProperty* p);
86 
87  /*!
88  \brief It returns a specified property.
89 
90  \param index The index of desired property.
91 
92  \return A specified property.
93 
94  \note You must not clear the returned property.
95 
96  \note The method will not check the index range.
97  */
98  const SortProperty* operator[](std::size_t index) const;
99 
100  //@}
101 
102  private:
103 
104  std::vector<SortProperty*> m_sortPropertyVector; //!< Mandatory at least one sort property.
105  };
106 
107  } // end namespace fe
108 } // end namespace te
109 
110 #endif // __TERRALIB_FE_INTERNAL_SORTBY_H
std::vector< SortProperty * > m_sortPropertyVector
Mandatory at least one sort property.
Definition: SortBy.h:104
#define TEFEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:59
A sort property name and order type.
Definition: SortProperty.h:48
URI C++ Library.
It represents a sort by expression.
Definition: SortBy.h:49
Configuration flags for the TerraLib Filter Encoding module.