MarketInfos.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 MarketInfos.hpp
35 
36  @author Jean-Christophe FABRE <jean-christophe.fabre@supagro.inra.fr>
37  */
38 
39 
40 #ifndef __OPENFLUID_MARKET_MARKETINFOS_HPP__
41 #define __OPENFLUID_MARKET_MARKETINFOS_HPP__
42 
43 #include <openfluid/dllexport.hpp>
45 
46 
47 namespace openfluid { namespace market {
48 
49 // =====================================================================
50 // =====================================================================
51 
52 
54 {
55  public:
56 
57  std::string Name;
58 
59  std::string Description;
60 
61  std::string Contact;
62 
64  {
65  Name.clear();
66  Description.clear();
67  Contact.clear();
68  }
69 
71 
72 
73  void clear()
74  {
75  Name.clear();
76  Description.clear();
77  Contact.clear();
78  }
79 
80 
81 };
82 
83 
84 // =====================================================================
85 // =====================================================================
86 
87 
89 {
90  public:
91 
92  // Package type
93  enum PackageType { SIM, OBS, BUILD, DATA};
94 
95  typedef std::map<PackageType,std::list<openfluid::ware::WareID_t> > Dependencies_t;
96 
97  std::string URL;
98 
99  std::string License;
100 
101  // List of dependencies
102  Dependencies_t Dependencies;
103 
104  std::string BuildOptions;
105 
107  {
108  URL.clear();
109  License.clear();
110  Dependencies.clear();
111  BuildOptions.clear();
112  }
113 
115 
116 };
117 
118 
119 // =====================================================================
120 // =====================================================================
121 
122 
124 {
125  public:
126 
127  // Package format
128  enum SelectionType { NONE, BIN, SRC, FLUIDX};
129 
131 
132  // List of PackageInfo for each format
133  std::map<SelectionType,PackageInfo> AvailablePackages;
134 
135  // Selected format
137 
138  std::string Name;
139 
140  std::string Description;
141 
142  std::string Authors;
143 
144  std::string Version;
145 
146 
148  {
149  ID.clear();
150  Selected = NONE;
151  AvailablePackages.clear();
152  Name.clear();
153  Authors.clear();
154  Description.clear();
155  Version.clear();
156  }
157 
159  {
160  }
161 
162 };
163 
164 
165 // =====================================================================
166 // =====================================================================
167 
168 
169 typedef std::map<openfluid::ware::WareID_t,MetaPackageInfo> MetaPackagesCatalog_t;
170 
171 
172 } } // namespaces
173 
174 
175 #endif /* __OPENFLUID_MARKET_MARKETINFOS_HPP__ */
Definition: MarketInfos.hpp:93
std::map< SelectionType, PackageInfo > AvailablePackages
Definition: MarketInfos.hpp:133
std::string Name
Definition: MarketInfos.hpp:138
Definition: MarketInfos.hpp:128
MarketInfo()
Definition: MarketInfos.hpp:63
std::string Name
Definition: MarketInfos.hpp:57
SelectionType
Definition: MarketInfos.hpp:128
PackageInfo()
Definition: MarketInfos.hpp:106
std::map< openfluid::ware::WareID_t, MetaPackageInfo > MetaPackagesCatalog_t
Definition: MarketInfos.hpp:169
PackageType
Definition: MarketInfos.hpp:93
std::string Authors
Definition: MarketInfos.hpp:142
std::string WareID_t
Definition: TypeDefs.hpp:50
std::string BuildOptions
Definition: MarketInfos.hpp:104
std::map< PackageType, std::list< openfluid::ware::WareID_t > > Dependencies_t
Definition: MarketInfos.hpp:95
Definition: MarketInfos.hpp:53
std::string Version
Definition: MarketInfos.hpp:144
std::string URL
Definition: MarketInfos.hpp:97
openfluid::ware::WareID_t ID
Definition: MarketInfos.hpp:130
std::string License
Definition: MarketInfos.hpp:99
Definition: MarketInfos.hpp:123
MetaPackageInfo()
Definition: MarketInfos.hpp:147
~MarketInfo()
Definition: MarketInfos.hpp:70
Dependencies_t Dependencies
Definition: MarketInfos.hpp:102
std::string Description
Definition: MarketInfos.hpp:140
SelectionType Selected
Definition: MarketInfos.hpp:136
~MetaPackageInfo()
Definition: MarketInfos.hpp:158
std::string Description
Definition: MarketInfos.hpp:59
std::string Contact
Definition: MarketInfos.hpp:61
Definition: MarketInfos.hpp:88
Definition: ApplicationException.hpp:47
~PackageInfo()
Definition: MarketInfos.hpp:114
#define OPENFLUID_API
Definition: dllexport.hpp:87
void clear()
Definition: MarketInfos.hpp:73