FunctionParameter.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/dataaccess/query/FunctionParameter.h
22 
23  \brief A FunctionParameter models the parameter of a function definition.
24 */
25 
26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_FUNCTIONPARAMETER_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_FUNCTIONPARAMETER_H
28 
29 // TerraLib
30 #include "../Config.h"
31 
32 // STL
33 #include <string>
34 
35 namespace te
36 {
37  namespace da
38  {
39  /*!
40  \class FunctionParameter
41 
42  \brief A FunctionParameter models the parameter of a function definition.
43 
44  \sa FunctionDefn
45  */
47  {
48  public:
49 
50  /*!
51  \brief Constructor.
52 
53  \param name The parameter name.
54  \param t The parameter type.
55  */
56  FunctionParameter(const std::string& name, int t) : m_name(name), m_type(t) {}
57 
58  /*! \brief Destructor. */
60 
61  /*!
62  \brief It returns the function name.
63 
64  \return The function name.
65  */
66  const std::string& getName() const { return m_name; }
67 
68  /*!
69  \brief It sets the function name.
70 
71  \param name The function name.
72  */
73  void setName(const std::string& name) { m_name = name; }
74 
75  /*!
76  \brief It returns the parameter type.
77 
78  \return The parameter type.
79  */
80  int getType() const { return m_type; }
81 
82  /*!
83  \brief It sets the parameter type.
84 
85  \param t The parameter type.
86  */
87  void setType(int t) { m_type = t; }
88 
89  private:
90 
91  std::string m_name; //!< Parameter name.
92  int m_type; //!< Parameter type.
93  };
94 
95  } // end namespace da
96 } // end namespace te
97 
98 #endif // __TERRALIB_DATAACCESS_INTERNAL_FUNCTIONPARAMETER_H
99 
100 
const std::string & getName() const
It returns the function name.
FunctionParameter(const std::string &name, int t)
Constructor.
std::string m_name
Parameter name.
void setName(const std::string &name)
It sets the function name.
int getType() const
It returns the parameter type.
TerraLib.
int m_type
Parameter type.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97
void setType(int t)
It sets the parameter type.
A FunctionParameter models the parameter of a function definition.