Loading...
Searching...
No Matches
Trim.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/Trim.h
22
23 \brief Strips off chars from a string value (String formatting functions).
24*/
25
26#ifndef __TERRALIB_SE_INTERNAL_TRIM_H
27#define __TERRALIB_SE_INTERNAL_TRIM_H
28
29// TerraLib
30#include "Function.h"
31
32namespace te
33{
34// Forward declaration
35 class ParameterValue;
36
37 namespace se
38 {
39 /*!
40 \class Trim
41
42 \brief Strips off chars from a string value (String formatting functions).
43
44 The function strips off "leading", "trailing",
45 or "both" chars from a string value. Attributes
46 control the mode of stripping and the character
47 stripped. Defaults are "leading" and blank.
48
49 \sa Function, ParameterValue, StringLength, StringPosition
50 */
51 class TESEEXPORT Trim : public Function
52 {
53 public:
54
55 /*!
56 \enum StripOffPositionType
57
58 \brief It controls the mode of stripping characters.
59 */
61 {
62 LEADING, /*!< It means to strips off leading chars from a string value. */
63 TRAILING, /*!< It means to strips off trailing chars from a string value. */
64 BOTH /*!< It means to strips off both (leading and trailing) chars from a string value. */
65 };
66
67 /** @name Initializer Methods
68 * Methods related to instantiation and destruction.
69 */
70 //@{
71
72 /*! \brief It initializes a new Trim. */
74
75 /*! \brief Destructor. */
77
78 //@}
79
82 void setStripOffChar(const std::string& v);
83
84 private:
85
86 ParameterValue* m_stringValue; //!< Mandatory.
88 std::string m_stripOffChar; //!< Mandatory.
89 };
90
91 } // end namespace se
92} // end namespace te
93
94#endif // __TERRALIB_SE_INTERNAL_TRIM_H
Symbology Encoding functions.
Definition: Function.h:66
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
Strips off chars from a string value (String formatting functions).
Definition: Trim.h:52
StripOffPositionType
It controls the mode of stripping characters.
Definition: Trim.h:61
@ LEADING
Definition: Trim.h:62
@ TRAILING
Definition: Trim.h:63
std::string m_stripOffChar
Mandatory.
Definition: Trim.h:88
StripOffPositionType m_stripOffPosition
Mandatory.
Definition: Trim.h:87
void setStringValue(ParameterValue *v)
ParameterValue * m_stringValue
Mandatory.
Definition: Trim.h:86
void setStripOffPosition(StripOffPositionType p)
Trim()
It initializes a new Trim.
void setStripOffChar(const std::string &v)
~Trim()
Destructor.
TerraLib.
Symbology Encoding functions.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201