Manual for OpenFLUID 2.1.10

WareSignature.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 WareSignature.hpp
35 
36  @author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37 */
38 
39 
40 #include <openfluid/dllexport.hpp>
41 #include <openfluid/ware/TypeDefs.hpp>
43 
44 
45 #ifndef __OPENFLUID_WARE_WARESIGNATURE_HPP__
46 #define __OPENFLUID_WARE_WARESIGNATURE_HPP__
47 
48 
49 namespace openfluid { namespace ware {
50 
51 
53 {
54  public:
55 
56  typedef std::vector<std::pair<std::string,std::string> > AuthorsList_t;
57 
59 
61 
62  std::string Description;
63 
64  /**
65  Version number
66  */
68 
69  /**
70  Development status
71  */
73 
74  /**
75  ABI version number used to build the ware
76  */
78 
79  /**
80  Authors as a list of pairs [name,email]
81  */
82  AuthorsList_t Authors;
83 
84 
85  // =====================================================================
86  // =====================================================================
87 
88 
90  {
91  clear();
92  }
93 
94 
95  // =====================================================================
96  // =====================================================================
97 
98 
99  void clear()
100  {
101  ID.clear();
102  Name.clear();
103  Description.clear();
104  Version.clear();
106  ABIVersion.clear();
107  Authors.clear();
108  }
109 
110 
111  // =====================================================================
112  // =====================================================================
113 
114 
115  virtual ~WareSignature()
116  {
117 
118  }
119 
120 
121  // =====================================================================
122  // =====================================================================
123 
124 
125  void setABIVersion(const WareVersion_t& Version)
126  {
127  ABIVersion = Version;
128  }
129 
130 
131  // =====================================================================
132  // =====================================================================
133 
134 
135  static std::string getStatusAsString(const WareStatus_t& Status)
136  {
137  std::string Str = "experimental";
138 
139  if (Status == WareStatus_t::BETA)
140  {
141  Str = "beta";
142  }
143  else if (Status == WareStatus_t::STABLE)
144  {
145  Str = "stable";
146  }
147 
148  return Str;
149  }
150 
151 };
152 
153 
154 } } // openfluid::ware
155 
156 
157 #endif /* __OPENFLUID_WARE_WARESIGNATURE_HPP__ */
void setABIVersion(const WareVersion_t &Version)
Definition: WareSignature.hpp:125
Definition: ApplicationException.hpp:47
std::string WareVersion_t
Definition: TypeDefs.hpp:53
Definition: TypeDefs.hpp:106
std::vector< std::pair< std::string, std::string > > AuthorsList_t
Definition: WareSignature.hpp:56
WareStatus_t
Definition: TypeDefs.hpp:101
Definition: WareSignature.hpp:52
std::string Description
Definition: WareSignature.hpp:62
Definition: TypeDefs.hpp:111
WareStatus_t Status
Definition: WareSignature.hpp:72
AuthorsList_t Authors
Definition: WareSignature.hpp:82
void clear()
Definition: WareSignature.hpp:99
#define OPENFLUID_API
Definition: dllexport.hpp:86
WareVersion_t ABIVersion
Definition: WareSignature.hpp:77
virtual ~WareSignature()
Definition: WareSignature.hpp:115
WareVersion_t Version
Definition: WareSignature.hpp:67
Definition: TypeDefs.hpp:116
static std::string getStatusAsString(const WareStatus_t &Status)
Definition: WareSignature.hpp:135
WareSignature()
Definition: WareSignature.hpp:89
std::string WareName_t
Definition: TypeDefs.hpp:51
WareID_t ID
Definition: WareSignature.hpp:58
std::string WareID_t
Definition: TypeDefs.hpp:49
WareName_t Name
Definition: WareSignature.hpp:60