00001 /* 00002 00003 This file is part of OpenFLUID software 00004 Copyright(c) 2007, INRA - Montpellier SupAgro 00005 00006 00007 == GNU General Public License Usage == 00008 00009 OpenFLUID is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 OpenFLUID is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>. 00021 00022 00023 == Other Usage == 00024 00025 Other Usage means a use of OpenFLUID that is inconsistent with the GPL 00026 license, and requires a written agreement between You and INRA. 00027 Licensees for Other Usage of OpenFLUID may use this file in accordance 00028 with the terms contained in the written agreement between You and INRA. 00029 00030 */ 00031 00032 00033 /** 00034 \file MarketInfos.hpp 00035 \brief Header of ... 00036 00037 \author Jean-Christophe FABRE <fabrejc@supagro.inra.fr> 00038 */ 00039 00040 00041 #ifndef __MARKETINFOS_HPP__ 00042 #define __MARKETINFOS_HPP__ 00043 00044 #include <openfluid/dllexport.hpp> 00045 #include <openfluid/ware/SimulatorSignature.hpp> 00046 00047 00048 namespace openfluid { namespace market { 00049 00050 // ===================================================================== 00051 // ===================================================================== 00052 00053 00054 class DLLEXPORT MarketInfo 00055 { 00056 public: 00057 00058 std::string Name; 00059 00060 std::string Description; 00061 00062 std::string Contact; 00063 00064 MarketInfo() 00065 { 00066 Name.clear(); 00067 Description.clear(); 00068 Contact.clear(); 00069 } 00070 00071 ~MarketInfo() { } 00072 00073 00074 void clear() 00075 { 00076 Name.clear(); 00077 Description.clear(); 00078 Contact.clear(); 00079 } 00080 00081 00082 }; 00083 00084 00085 // ===================================================================== 00086 // ===================================================================== 00087 00088 00089 class DLLEXPORT PackageInfo 00090 { 00091 public: 00092 00093 // Package type 00094 enum PackageType { SIM, OBS, BUILD, DATA}; 00095 00096 typedef std::map<PackageType,std::list<openfluid::ware::WareID_t> > Dependencies_t; 00097 00098 std::string URL; 00099 00100 std::string License; 00101 00102 // List of dependencies 00103 Dependencies_t Dependencies; 00104 00105 std::string BuildOptions; 00106 00107 PackageInfo() 00108 { 00109 URL.clear(); 00110 License.clear(); 00111 Dependencies.clear(); 00112 BuildOptions.clear(); 00113 } 00114 00115 ~PackageInfo() { } 00116 00117 }; 00118 00119 00120 // ===================================================================== 00121 // ===================================================================== 00122 00123 00124 class DLLEXPORT MetaPackageInfo 00125 { 00126 public: 00127 00128 // Package format 00129 enum SelectionType { NONE, BIN, SRC, FLUIDX}; 00130 00131 openfluid::ware::WareID_t ID; 00132 00133 // List of PackageInfo for each format 00134 std::map<SelectionType,PackageInfo> AvailablePackages; 00135 00136 // Selected format 00137 SelectionType Selected; 00138 00139 std::string Name; 00140 00141 std::string Description; 00142 00143 std::string Authors; 00144 00145 std::string Version; 00146 00147 00148 MetaPackageInfo() 00149 { 00150 ID.clear(); 00151 Selected = NONE; 00152 AvailablePackages.clear(); 00153 Name.clear(); 00154 Authors.clear(); 00155 Description.clear(); 00156 Version.clear(); 00157 } 00158 00159 ~MetaPackageInfo() 00160 { 00161 } 00162 00163 }; 00164 00165 00166 // ===================================================================== 00167 // ===================================================================== 00168 00169 00170 typedef std::map<openfluid::ware::WareID_t,MetaPackageInfo> MetaPackagesCatalog_t; 00171 00172 00173 } } // namespaces 00174 00175 00176 #endif /* __MARKETINFOS_HPP__ */