SpatialUnitDescriptor.hpp
Go to the documentation of this file.
1 /*
2 
3  This file is part of OpenFLUID software
4  Copyright(c) 2007, INRA - Montpellier SupAgro
5 
6 
7  == GNU General Public License Usage ==
8 
9  OpenFLUID is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  OpenFLUID is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21 
22 
23  == Other Usage ==
24 
25  Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26  license, and requires a written agreement between You and INRA.
27  Licensees for Other Usage of OpenFLUID may use this file in accordance
28  with the terms contained in the written agreement between You and INRA.
29 
30 */
31 
32 
33 
34 /**
35  @file SpatialUnitDescriptor.hpp
36 
37  @author Jean-Christophe FABRE <jean-christophe.fabre@supagro.inra.fr>
38  */
39 
40 
41 #ifndef __OPENFLUID_FLUIDX_SPATIALUNITDESCRIPTOR_HPP__
42 #define __OPENFLUID_FLUIDX_SPATIALUNITDESCRIPTOR_HPP__
43 
44 #include <openfluid/dllexport.hpp>
45 #include <openfluid/core/TypeDefs.hpp>
46 
47 
48 namespace openfluid { namespace fluidx {
49 
50 
52 {
53  private:
54 
56  openfluid::core::UnitsClass_t m_UnitsClass;
57  openfluid::core::PcsOrd_t m_PcsOrder;
58  std::list<openfluid::core::UnitClassID_t> m_ToUnits;
59  std::list<openfluid::core::UnitClassID_t> m_ParentUnits;
60 
61  public:
62 
64 
66 
67 
69  { return m_UnitID; };
70 
72  { m_UnitID = ID; };
73 
75  { return m_UnitsClass; };
76 
77  inline void setUnitsClass(const openfluid::core::UnitsClass_t& UClass)
78  { m_UnitsClass = UClass; };
79 
81  { return m_PcsOrder; };
82 
84  { m_PcsOrder = Order; };
85 
86  inline std::list<openfluid::core::UnitClassID_t>& toSpatialUnits()
87  { return m_ToUnits; };
88 
89  inline const std::list<openfluid::core::UnitClassID_t>& toSpatialUnits() const
90  { return m_ToUnits; };
91 
92  inline std::list<openfluid::core::UnitClassID_t>& parentSpatialUnits()
93  { return m_ParentUnits; };
94 
95  inline const std::list<openfluid::core::UnitClassID_t>& parentSpatialUnits() const
96  { return m_ParentUnits; };
97 };
98 
99 
100 } } // namespaces
101 
102 
103 #endif /* __OPENFLUID_FLUIDX_SPATIALUNITDESCRIPTOR_HPP__ */
std::string UnitsClass_t
Definition: TypeDefs.hpp:71
void setProcessOrder(openfluid::core::PcsOrd_t Order)
Definition: SpatialUnitDescriptor.hpp:83
const std::list< openfluid::core::UnitClassID_t > & parentSpatialUnits() const
Definition: SpatialUnitDescriptor.hpp:95
openfluid::core::UnitID_t getID() const
Definition: SpatialUnitDescriptor.hpp:68
const openfluid::core::UnitsClass_t getUnitsClass() const
Definition: SpatialUnitDescriptor.hpp:74
void setID(openfluid::core::UnitID_t ID)
Definition: SpatialUnitDescriptor.hpp:71
Definition: SpatialUnitDescriptor.hpp:51
std::list< openfluid::core::UnitClassID_t > & parentSpatialUnits()
Definition: SpatialUnitDescriptor.hpp:92
Definition: ApplicationException.hpp:47
openfluid::core::PcsOrd_t getProcessOrder() const
Definition: SpatialUnitDescriptor.hpp:80
#define OPENFLUID_API
Definition: dllexport.hpp:87
int PcsOrd_t
Definition: TypeDefs.hpp:66
unsigned int UnitID_t
Definition: TypeDefs.hpp:61
const std::list< openfluid::core::UnitClassID_t > & toSpatialUnits() const
Definition: SpatialUnitDescriptor.hpp:89
std::list< openfluid::core::UnitClassID_t > & toSpatialUnits()
Definition: SpatialUnitDescriptor.hpp:86
void setUnitsClass(const openfluid::core::UnitsClass_t &UClass)
Definition: SpatialUnitDescriptor.hpp:77