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