Documentation for OpenFLUID 2.2.0
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  @file SpatialUnitDescriptor.hpp
35 
36  @author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37  */
38 
39 
40 #ifndef __OPENFLUID_FLUIDX_SPATIALUNITDESCRIPTOR_HPP__
41 #define __OPENFLUID_FLUIDX_SPATIALUNITDESCRIPTOR_HPP__
42 
43 
44 #include <openfluid/dllexport.hpp>
45 #include <openfluid/core/TypeDefs.hpp>
47 
48 
49 namespace openfluid { namespace fluidx {
50 
51 
53 {
54  private:
55 
57 
58  openfluid::core::UnitsClass_t m_UnitsClass;
59 
60  openfluid::core::PcsOrd_t m_PcsOrder;
61 
62  std::list<openfluid::core::UnitClassID_t> m_ToUnits;
63 
64  std::list<openfluid::core::UnitClassID_t> m_ParentUnits;
65 
66  std::map<openfluid::core::AttributeName_t,std::string> m_Attributes;
67 
68  std::list<openfluid::fluidx::EventDescriptor> m_Events;
69 
70 
71  public:
72 
74 
76 
77 
79  {
80  return m_UnitID;
81  }
82 
84  {
85  m_UnitID = ID;
86  }
87 
89  {
90  return m_UnitsClass;
91  }
92 
93  inline void setUnitsClass(const openfluid::core::UnitsClass_t& UClass)
94  {
95  m_UnitsClass = UClass;
96  }
97 
99  {
100  return m_PcsOrder;
101  }
102 
104  {
105  m_PcsOrder = Order;
106  }
107 
108  inline std::list<openfluid::core::UnitClassID_t>& toSpatialUnits()
109  {
110  return m_ToUnits;
111  }
112 
113  inline const std::list<openfluid::core::UnitClassID_t>& toSpatialUnits() const
114  {
115  return m_ToUnits;
116  }
117 
118  inline std::list<openfluid::core::UnitClassID_t>& parentSpatialUnits()
119  {
120  return m_ParentUnits;
121  }
122 
123  inline const std::list<openfluid::core::UnitClassID_t>& parentSpatialUnits() const
124  {
125  return m_ParentUnits;
126  }
127 
128  inline std::map<openfluid::core::AttributeName_t,std::string>& attributes()
129  {
130  return m_Attributes;
131  }
132 
133  inline const std::map<openfluid::core::AttributeName_t,std::string>& attributes() const
134  {
135  return m_Attributes;
136  }
137 
138  inline const std::list<openfluid::fluidx::EventDescriptor>& events() const
139  {
140  return m_Events;
141  }
142 
143  inline std::list<openfluid::fluidx::EventDescriptor>& events()
144  {
145  return m_Events;
146  }
147 };
148 
149 
150 } } // namespaces
151 
152 
153 #endif /* __OPENFLUID_FLUIDX_SPATIALUNITDESCRIPTOR_HPP__ */
Definition: SpatialUnitDescriptor.hpp:53
std::list< openfluid::fluidx::EventDescriptor > & events()
Definition: SpatialUnitDescriptor.hpp:143
const openfluid::core::UnitsClass_t getUnitsClass() const
Definition: SpatialUnitDescriptor.hpp:88
const std::list< openfluid::core::UnitClassID_t > & toSpatialUnits() const
Definition: SpatialUnitDescriptor.hpp:113
std::map< openfluid::core::AttributeName_t, std::string > & attributes()
Definition: SpatialUnitDescriptor.hpp:128
void setUnitsClass(const openfluid::core::UnitsClass_t &UClass)
Definition: SpatialUnitDescriptor.hpp:93
const std::list< openfluid::core::UnitClassID_t > & parentSpatialUnits() const
Definition: SpatialUnitDescriptor.hpp:123
std::list< openfluid::core::UnitClassID_t > & toSpatialUnits()
Definition: SpatialUnitDescriptor.hpp:108
const std::map< openfluid::core::AttributeName_t, std::string > & attributes() const
Definition: SpatialUnitDescriptor.hpp:133
const std::list< openfluid::fluidx::EventDescriptor > & events() const
Definition: SpatialUnitDescriptor.hpp:138
std::list< openfluid::core::UnitClassID_t > & parentSpatialUnits()
Definition: SpatialUnitDescriptor.hpp:118
openfluid::core::UnitID_t getID() const
Definition: SpatialUnitDescriptor.hpp:78
openfluid::core::PcsOrd_t getProcessOrder() const
Definition: SpatialUnitDescriptor.hpp:98
void setID(openfluid::core::UnitID_t ID)
Definition: SpatialUnitDescriptor.hpp:83
void setProcessOrder(openfluid::core::PcsOrd_t Order)
Definition: SpatialUnitDescriptor.hpp:103
#define OPENFLUID_API
Definition: dllexport.hpp:86
unsigned int UnitID_t
Definition: TypeDefs.hpp:70
std::string UnitsClass_t
Definition: TypeDefs.hpp:98
int PcsOrd_t
Definition: TypeDefs.hpp:84
Definition: ApplicationException.hpp:47