Facet.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 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 General Public License for more details.
14 
15  You should have received a copy of the GNU 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 Facet.h
22 
23  \brief This class can be used to model a facet (a constraint in the range of values).
24 */
25 
26 #ifndef __TERRALIB_XSD_INTERNAL_FACET_H
27 #define __TERRALIB_XSD_INTERNAL_FACET_H
28 
29 // TerraLib
30 #include "Config.h"
31 #include "Enums.h"
32 
33 // STL
34 #include <string>
35 
36 namespace te
37 {
38  namespace xsd
39  {
40  /*!
41  \class Facet
42 
43  \brief This class can be used to model a facet (a constraint in the range of values).
44  */
46  {
47  public:
48 
49  /*!
50  \brief Constructor.
51 
52  \param fType Facet type.
53  \param value Facet value.
54  */
55  Facet(FacetType fType, const std::string& value);
56 
57  /*!
58  \brief Copy constructor.
59 
60  \param rhs Right-hand-side object.
61 
62  \todo Implement!
63  */
64  Facet(const Facet& rhs);
65 
66  /*! \brief Destructor. */
67  ~Facet();
68 
69  /*!
70  \brief Assignment operator.
71 
72  \param rhs Right-hand-side object.
73 
74  \return A reference to this object.
75 
76  \todo Implement!
77  */
78  Facet& operator=(const Facet& rhs);
79 
80  /*!
81  \brief It returns the facet type code.
82 
83  \return The facet type code.
84  */
85  FacetType getType() const;
86 
87  /*!
88  \brief It returns the facet type name.
89 
90  \return The facet type name.
91  */
92  const std::string& getName() const;
93 
94  /*!
95  \brief It returns the facet value.
96 
97  \return The facet value.
98  */
99  const std::string& getValue();
100 
101  private:
102 
103  FacetType m_type; //!< The facet type.
104  std::string m_value; //!< The facet associated value.
105  static std::string m_typeNames[12]; //!< The list of names for available facet types.
106  };
107 
108  } // end namespace xsd
109 } // end namespace te
110 
111 #endif // __TERRALIB_XSD_INTERNAL_FACET_H
Configuration flags for the XSD Module of TerraLib.
FacetType m_type
The facet type.
Definition: Facet.h:103
URI C++ Library.
#define TEXSDEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:57
std::string m_value
The facet associated value.
Definition: Facet.h:104
FacetType
It enumerates the available facet types.
Definition: Enums.h:91
This class can be used to model a facet (a constraint in the range of values).
Definition: Facet.h:45