All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TypeDefs.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
36 
37  @author Jean-Christophe FABRE <fabrejc@supagro.inra.fr>
38 */
39 
40 #ifndef __TYPEDEFS_H__
41 #define __TYPEDEFS_H__
42 
43 #include <vector>
44 #include <list>
45 #include <map>
46 #include <openfluid/dllexport.hpp>
50 
51 
52 namespace openfluid { namespace core {
53 
54 
55 
56 /**
57  Type definition for the ID of units
58 */
59 typedef unsigned int UnitID_t;
60 
61 /**
62  Type definition for the process order of units
63 */
64 typedef int PcsOrd_t;
65 
66 /**
67  Type definition for the class of units
68 */
69 typedef std::string UnitClass_t;
70 
71 /**
72  Type definition for name of an attribute
73 */
74 typedef std::string AttributeName_t;
75 
76 /**
77  Type definition for name of a variable
78 */
79 typedef std::string VariableName_t;
80 
81 
82 typedef std::pair<UnitClass_t,UnitID_t> UnitClassID_t;
83 
84 typedef std::pair<UnitClassID_t,UnitClassID_t> UnitsLink_t;
85 
86 
87 /**
88  Type definition for a serie of DoubleValue
89  */
90 typedef std::vector<DoubleValue> SerieOfDoubleValue;
91 
92 
93 /**
94  Type definition for a serie of VectorValue
95  */
96 typedef std::vector<VectorValue> SerieOfVectorValue;
97 
98 
99 // =====================================================================
100 // =====================================================================
101 
102 /**
103  Generic map container associating a unit ID to data
104 */
105 template<class T>
106 struct IDMap
107 {
108  typedef std::map<UnitID_t,T> Type;
109 };
110 
111 
112 /**
113  Map associating a float value to a unit ID
114 */
116 
117 /**
118  Map associating a double precision value to a unit ID
119 */
121 
122 /**
123  Map associating a DoubleValue value to a unit ID
124 */
126 
127 /**
128  Map associating an integer value to a unit ID
129 */
131 
132 /**
133  Map associating a boolean value to a unit ID
134 */
136 
137 /**
138  Map associating an openfluid::core::VectorValue value to a unit ID
139 */
141 
142 /**
143  Map associating a pointer to an openfluid::core::VectorValue value to a unit ID
144 */
146 
148 
150 
151 
152 
153 
154 } } // namespaces
155 
156 
157 #endif /*__TYPEDEFS_H__*/
IDMap< VectorValue * >::Type IDVectorValuePtrMap
Definition: TypeDefs.hpp:145
Definition: TypeDefs.hpp:106
std::string AttributeName_t
Definition: TypeDefs.hpp:74
Header of ...
IDMap< int >::Type IDIntMap
Definition: TypeDefs.hpp:130
IDMap< SerieOfDoubleValue >::Type IDSerieOfDoubleValueMap
Definition: TypeDefs.hpp:147
std::map< UnitID_t, T > Type
Definition: TypeDefs.hpp:108
std::string UnitClass_t
Definition: TypeDefs.hpp:69
IDMap< SerieOfDoubleValue * >::Type IDSerieOfDoubleValuePtrMap
Definition: TypeDefs.hpp:149
std::pair< UnitClass_t, UnitID_t > UnitClassID_t
Definition: TypeDefs.hpp:82
IDMap< DoubleValue >::Type IDDoubleValueMap
Definition: TypeDefs.hpp:125
Header of ...
unsigned int UnitID_t
Definition: TypeDefs.hpp:59
int PcsOrd_t
Definition: TypeDefs.hpp:64
std::pair< UnitClassID_t, UnitClassID_t > UnitsLink_t
Definition: TypeDefs.hpp:84
IDMap< VectorValue >::Type IDVectorValueMap
Definition: TypeDefs.hpp:140
std::vector< VectorValue > SerieOfVectorValue
Definition: TypeDefs.hpp:96
IDMap< float >::Type IDFloatMap
Definition: TypeDefs.hpp:115
std::string VariableName_t
Definition: TypeDefs.hpp:79
IDMap< double >::Type IDDoubleMap
Definition: TypeDefs.hpp:120
IDMap< bool >::Type IDBoolMap
Definition: TypeDefs.hpp:135
std::vector< DoubleValue > SerieOfDoubleValue
Definition: TypeDefs.hpp:90
Header of ...