Selector.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 Selector.h
22 
23  \brief It models the selector element of an XML Schema.
24 */
25 
26 #ifndef __TERRALIB_XSD_INTERNAL_SELECTOR_H
27 #define __TERRALIB_XSD_INTERNAL_SELECTOR_H
28 
29 // TerraLib
30 #include "Annotated.h"
31 #include "Identifiable.h"
32 
33 namespace te
34 {
35  namespace xsd
36  {
37  /*!
38  \class Selector
39 
40  \brief It models the selector element of an XML Schema.
41 
42  \note Parent elements: key, keyref, unique.
43  */
44  class TEXSDEXPORT Selector : public Identifiable, public Annotated
45  {
46  public:
47 
48  /*!
49  \brief Constructor.
50 
51  \param id It specifies a unique ID for the element. It may be a NULL value.
52  \param xpath It identifies a single element or attribute whose content or value is used for the constraint. It is required a non-NULL value.
53 
54  \note The Selector object will take the ownership of the given pointers.
55  */
56  Selector(std::string* xpath, Annotation* ann = 0, std::string* id = 0);
57 
58  /*!
59  \brief Copy constructor.
60 
61  \param rhs Right-hand-side object.
62 
63  \todo Implement!
64  */
65  Selector(const Selector& rhs);
66 
67  /*! \brief Destructor. */
68  ~Selector();
69 
70  /*!
71  \brief Assignment operator.
72 
73  \param rhs Right-hand-side object.
74 
75  \return A reference to this object.
76 
77  \todo Implement!
78  */
79  Selector& operator=(const Selector& rhs);
80 
81  /*!
82  \brief It returns the xpath expression of the Selector element.
83 
84  \return The xpath expression.
85  */
86  std::string* getXPath() const;
87 
88  /*!
89  \brief It sets the xpath expression of the Selector element.
90 
91  \param xpath It specifies the xpath expression of the Selector element.
92 
93  \note The Selector object will take the ownership of the given pointer.
94  */
95  void setXPath(std::string* xpath);
96 
97  private:
98 
99  std::string* m_xpath; //!< It specifies an XPath expression, relative to the element being declared, that identifies the child elements to which the identity constraint applies. (Required)
100  };
101 
102  } // end namespace xsd
103 } // end namespace te
104 
105 #endif // __TERRALIB_XSD_INTERNAL_SELECTOR_H
A base class for XSD classes that may allow annotation.
Definition: Annotated.h:49
A base class for XSD classes that may allow annotation.
A base class for XSD classes that must provide a unique ID property.
Definition: Identifiable.h:46
URI C++ Library.
std::string * m_xpath
It specifies an XPath expression, relative to the element being declared, that identifies the child e...
Definition: Selector.h:99
It models the selector element of an XML Schema.
Definition: Selector.h:44
A base class for XSD classes that must provide a unique ID property.
#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