AppInfo.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 AppInfo.h
22 
23  \brief This class models an object that specifies information to be used by applications.
24 */
25 
26 #ifndef __TERRALIB_XSD_INTERNAL_APPINFO_H
27 #define __TERRALIB_XSD_INTERNAL_APPINFO_H
28 
29 // TerraLib
30 #include "AnnotationItem.h"
31 
32 // STL
33 #include <string>
34 
35 namespace te
36 {
37  namespace xsd
38  {
39  /*!
40  \class AppInfo
41 
42  \brief This class models an object that specifies information to be used by applications.
43 
44  \sa Annotation, AnnotationItem, Documentation
45 
46  \note Parent element: Annotation.
47  */
49  {
50  public:
51 
52  /*!
53  \brief Constructor.
54 
55  \param source A URI reference that specifies the source of the application information.
56  \param value Any descriptive information.
57 
58  \note The AppInfo object will take the ownership of the source and value pointers.
59  */
60  AppInfo(std::string* source, std::string* value);
61 
62  /*!
63  \brief Copy constructor.
64 
65  \param rhs Right-hand-side object.
66  */
67  AppInfo(const AppInfo& rhs);
68 
69  /*! \brief Destructor. */
70  ~AppInfo();
71 
72  /*!
73  \brief Assignment operator.
74 
75  \param rhs Right-hand-side object.
76 
77  \return A reference to this object.
78  */
79  AppInfo& operator=(const AppInfo& rhs);
80 
81  /*!
82  \brief It sets the information to be used by the application.
83 
84  \param value A machine readable material.
85 
86  \note The AppInfo object will take the ownership of the given pointer.
87  */
88  void setValue(std::string* value);
89 
90  /*!
91  \brief It sets the URI that specifies the source of the information.
92 
93  \param info An URI.
94  */
95  void setSource(std::string* source);
96 
97  /*!
98  \brief It returns the information associated to the annotation.
99 
100  \return The information associated to the annotation.
101  */
102  std::string* getValue() const;
103 
104  /*!
105  \brief It returns the URI that specifies the source of the information.
106 
107  \return The URI.
108  */
109  std::string* getSource() const;
110 
111  AnnotationItem* clone() const;
112 
113  private:
114 
115  std::string* m_source; //!< An URI that specifies the source of the application information. (Optional)
116  std::string* m_value; //!< An information to be used by the application. (Required)
117  };
118 
119  } // end namespace xsd
120 } // end namespace te
121 
122 #endif // __TERRALIB_XSD_INTERNAL_APPINFO_H
A base class for XSD annotation elements.
std::string * m_source
An URI that specifies the source of the application information. (Optional)
Definition: AppInfo.h:115
This class models an object that specifies information to be used by applications.
Definition: AppInfo.h:48
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
An information to be used by the application. (Required)
Definition: AppInfo.h:116
A base class for XSD annotation elements.