ParameterValue.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 terralib/se/ParameterValue.h
22 
23  \brief The ParameterValueType uses WFS-Filter expressions to give values for SE graphic parameters.
24 */
25 
26 #ifndef __TERRALIB_SE_INTERNAL_PARAMETERVALUE_H
27 #define __TERRALIB_SE_INTERNAL_PARAMETERVALUE_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // STL
33 #include <string>
34 #include <vector>
35 
36 namespace te
37 {
38  namespace fe { class Expression; }
39 
40  namespace se
41  {
42  /*!
43  \class ParameterValue
44 
45  \brief The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
46 
47  A "mixed" element-content
48  model is used with textual substitution for values.
49 
50  \ingroup se
51 
52  \sa SvgParameter, LineSymbolizer, GraphicStroke, Halo, MapItem, Interpolate, InterpolationPoint
53  */
55  {
56  public:
57 
58  /*!
59  \struct Parameter
60 
61  \brief Data parameter.
62  */
64  {
65  std::string* m_mixedData; //!< Parameter from a mixed data content.
66  te::fe::Expression* m_expression; //!< Parameter from an expression.
67 
68  Parameter();
69  Parameter(const Parameter& rhs);
70  ~Parameter();
71  };
72 
73  /** @name Initializer Methods
74  * Methods related to instantiation and destruction.
75  */
76  //@{
77 
78  /*! \brief It initializes an empty ParameterValue. */
80 
81  /*!
82  \brief It initializes a new ParameterValue based on given literal value.
83 
84  \param value Literal value for the new ParamaterValue.
85 
86  \note A new Parameter with a Filter Literal Expression will be created and added to ParamaterValue.
87  */
88  ParameterValue(const std::string& value);
89 
90  /*!
91  \brief Copy constructor.
92 
93  \param rhs The other parameter value.
94  */
95  ParameterValue(const ParameterValue& rhs);
96 
97  /*! \brief Virtual destructor. */
98  virtual ~ParameterValue();
99 
100  //@}
101 
102  /** @name Accessors
103  * Methods for retrieving and setting properties.
104  */
105  //@{
106 
107  void add(Parameter* p);
108  void add(const std::string& value);
109 
110  size_t getNParameters() const;
111  const Parameter* getParameter(size_t i) const;
112 
113  //@}
114 
115  /*! \brief It creates a new copy of this object. */
116  ParameterValue* clone() const;
117 
118  private:
119 
120  std::vector<Parameter*> m_parameters; //!< Regular text may be mixed and WFS-Filter expressions to give values for SE graphic parameters. (Optional)
121  };
122 
123  } // end namespace se
124 } // end namespace te
125 
126 #endif // __TERRALIB_SE_INTERNAL_PARAMETERVALUE_H
te::fe::Expression * m_expression
Parameter from an expression.
std::string * m_mixedData
Parameter from a mixed data content.
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
URI C++ Library.
This is an abstract class that models a Filter Encoding expression.
Definition: Expression.h:50
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:187
Configuration flags for the Symbology Encoding support of TerraLib.
std::vector< Parameter * > m_parameters
Regular text may be mixed and WFS-Filter expressions to give values for SE graphic parameters...