SimpleBuiltInType.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 SimpleBuiltInType.h
22 
23  \brief A class for representing built-in XML Schema types.
24 */
25 
26 #ifndef __TERRALIB_XSD_INTERNAL_SIMPLEBUILTINTYPE_H
27 #define __TERRALIB_XSD_INTERNAL_SIMPLEBUILTINTYPE_H
28 
29 // TerraLib
30 #include "Enums.h"
31 #include "Type.h"
32 
33 namespace te
34 {
35  namespace xsd
36  {
37  /*!
38  \class SimpleBuiltInType
39 
40  \brief A class for representing built-in XML Schema types.
41 
42  It represents atomic types like: string, int, byte and others.
43  */
45  {
46  public:
47 
48  /*!
49  \brief Constructor.
50 
51  \param t The built-in type code.
52  */
54 
55  /*!
56  \brief Copy constructor.
57 
58  \param rhs Right-hand-side object.
59  */
61 
62  /*! \brief Destructor. */
64 
65  /*!
66  \brief Assignment operator.
67 
68  \param rhs Right-hand-side object.
69 
70  \return A reference to this object.
71  */
72  SimpleBuiltInType& operator=(const SimpleBuiltInType& rhs);
73 
74  /*!
75  \brief It returns the built-in type code.
76 
77  \return The built-in type code.
78  */
79  BuiltInType getType() const;
80 
81  /*!
82  \brief It returns the built-in type name.
83 
84  \return The built-in type name.
85  */
86  const std::string& getName() const;
87 
88  Type* clone() const;
89 
90  private:
91 
92  BuiltInType m_type; //!< The built-in type.
93  static std::string m_typeNames[1]; //!< The list of names for available types.
94  };
95 
96  } // end namespace xsd
97 } // end namespace te
98 
99 #endif // __TERRALIB_XSD_INTERNAL_SIMPLEBUILTINTYPE_H
An abstract class for modeling the definition of a new XML Schema Type.
BuiltInType m_type
The built-in type.
URI C++ Library.
A class for representing built-in XML Schema types.
BuiltInType
It enumerates the available built-in types.
Definition: Enums.h:81
#define TEXSDEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:57
An abstract class for modeling the definition of a new XML Schema Type.
Definition: Type.h:65