Annotated.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 Annotated.h
22 
23  \brief A base class for XSD classes that may allow annotation.
24 */
25 
26 #ifndef __TERRALIB_XSD_INTERNAL_ANNOTATED_H
27 #define __TERRALIB_XSD_INTERNAL_ANNOTATED_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // STL
33 #include <string>
34 
35 namespace te
36 {
37  namespace xsd
38  {
39 // Forward declaration
40  class Annotation;
41 
42  /*!
43  \class Annotated
44 
45  \brief A base class for XSD classes that may allow annotation.
46 
47  \sa Annotation, Attribute
48  */
50  {
51  public:
52 
53  /*!
54  \brief It returns the associated annotation.
55 
56  \return The associated annotation.
57  */
58  Annotation* getAnnotation() const;
59 
60  /*!
61  \brief It sets the associated annotation.
62 
63  \param ann The annotation to be associated to the object. The annotated class will take the ownership of the given pointer.
64  */
65  void setAnnotation(Annotation* ann);
66 
67  protected:
68 
69  /*!
70  \brief Constructor.
71 
72  \param ann The annotation to be associated to the object.
73 
74  \note The Annotation object will take the ownership of the informed pointer.
75  */
76  Annotated(Annotation* ann = 0);
77 
78  /*!
79  \brief Copy constructor.
80 
81  \param rhs Right-hand-side object.
82  */
83  Annotated(const Annotated& rhs);
84 
85  /*! \brief Destructor. */
86  ~Annotated();
87 
88  /*!
89  \brief Assignment operator.
90 
91  \param rhs Right-hand-side object.
92 
93  \return A reference to this object.
94  */
95  Annotated& operator=(const Annotated& rhs);
96 
97  private:
98 
99  Annotation* m_annotation; //!< Annotation for human reading or machine consumption. (Optional)
100  };
101 
102  } // end namespace xsd
103 } // end namespace te
104 
105 #endif // __TERRALIB_XSD_INTERNAL_ANNOTATED_H
106 
Configuration flags for the XSD Module of TerraLib.
A base class for XSD classes that may allow annotation.
Definition: Annotated.h:49
Annotation * m_annotation
Annotation for human reading or machine consumption. (Optional)
Definition: Annotated.h:99
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
A class that models a XSD annotation element.
Definition: Annotation.h:55