All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WareSetDescriptor.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  @file
34 
35  @author Jean-Christophe FABRE <fabrejc@supagro.inra.fr>
36  */
37 
38 #ifndef __WARESETDESCRIPTOR_HPP__
39 #define __WARESETDESCRIPTOR_HPP__
40 
41 #include <list>
43 #include <openfluid/dllexport.hpp>
44 
45 namespace openfluid {
46 namespace fluidx {
47 
48 template<class T>
50 {
51  public:
52  typedef std::list<T*> SetDescription_t;
53 
54  private:
55  SetDescription_t m_SetDescription;
56 
58 
59  public:
60 
62  {
63  }
64  ;
65 
67  {
68  return (m_SetDescription);
69  }
70  ;
71 
72  // =====================================================================
73  // =====================================================================
74 
75  inline const SetDescription_t& getItems() const
76  {
77  return (m_SetDescription);
78  }
79  ;
80 
81  // =====================================================================
82  // =====================================================================
83 
86  {
87  m_Params[Key] = Value;
88  }
89 
90  // =====================================================================
91  // =====================================================================
92 
94  {
95  openfluid::ware::WareParams_t::const_iterator it;
96 
97  for (it=Params.begin();it!=Params.end();++it)
98  m_Params[it->first] = it->second;
99  }
100 
101  // =====================================================================
102  // =====================================================================
103 
105  {
106  return m_Params;
107  }
108 
109  // =====================================================================
110  // =====================================================================
111 
113  {
114  m_Params.erase(Key);
115  }
116 
117  // =====================================================================
118  // =====================================================================
119 
120  void appendItem(T *Item)
121  {
122  m_SetDescription.push_back(Item);
123  }
124 
125 };
126 
127 }
128 } // namespaces
129 
130 #endif /* __MODELDESCRIPTOR_HPP__ */
void setGlobalParameter(const openfluid::ware::WareParamKey_t &Key, const openfluid::ware::WareParamValue_t &Value)
Definition: WareSetDescriptor.hpp:84
Definition: StringValue.hpp:91
std::map< WareParamKey_t, WareParamValue_t > WareParams_t
Definition: PluggableWare.hpp:82
void appendItem(T *Item)
Definition: WareSetDescriptor.hpp:120
Definition: WareSetDescriptor.hpp:49
const SetDescription_t & getItems() const
Definition: WareSetDescriptor.hpp:75
void eraseGlobalParameter(const openfluid::ware::WareParamKey_t &Key)
Definition: WareSetDescriptor.hpp:112
void setGlobalParameters(const openfluid::ware::WareParams_t &Params)
Definition: WareSetDescriptor.hpp:93
SetDescription_t & getItems()
Definition: WareSetDescriptor.hpp:66
std::list< T * > SetDescription_t
Definition: WareSetDescriptor.hpp:52
std::string WareParamKey_t
Definition: PluggableWare.hpp:79
openfluid::ware::WareParams_t getGlobalParameters()
Definition: WareSetDescriptor.hpp:104
#define DLLEXPORT
Definition: dllexport.hpp:51