Loading...
Searching...
No Matches
Distance.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/common/Distance.h
22
23 \brief A given distance has a measurement and a unit-of-measure.
24*/
25
26#ifndef __TERRALIB_COMMON_INTERNAL_DISTANCE_H
27#define __TERRALIB_COMMON_INTERNAL_DISTANCE_H
28
29// TerraLib
30#include "Config.h"
31
32// STL
33#include <string>
34
35namespace te
36{
37 namespace common
38 {
39 /*!
40 \class Distance
41
42 \brief A given distance has a measurement and a unit-of-measure.
43 */
45 {
46 public:
47
48 /** @name Initializer Methods
49 * Methods related to instantiation and destruction.
50 */
51 //@{
52
53 /*!
54 \brief It initializes a new Distance.
55
56 \param value The value associated to the measure.
57 \param uomIdx An index to a valid unit-of-measure. See the Unit-of-measure manager class for more information on it.
58 */
59 Distance(const double& value, std::size_t uomIdx);
60
61 /*! \brief Destructor. */
63
64 //@}
65
66 /** @name Accessor methods
67 * Methods used to get or set properties.
68 */
69 //@{
70
71 void setDistance(const double& value);
72
73 const double& getDistance() const;
74
75 void setUom(std::size_t uom);
76
77 std::size_t getUom() const;
78
79 Distance* clone() const;
80
81 //@}
82
83 private:
84
85 double m_value;
86 std::size_t m_uom;
87 };
88
89 } // end namespace common
90} // end namespace te
91
92#endif // __TERRALIB_COMMON_INTERNAL_DISTANCE_H
A given distance has a measurement and a unit-of-measure.
Definition: Distance.h:45
void setUom(std::size_t uom)
Distance * clone() const
const double & getDistance() const
std::size_t getUom() const
void setDistance(const double &value)
~Distance()
Destructor.
std::size_t m_uom
Definition: Distance.h:86
Distance(const double &value, std::size_t uomIdx)
It initializes a new Distance.
TerraLib.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66
Proxy configuration file for TerraView (see terraview_config.h).