Manual for OpenFLUID 2.1.11

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 
58  /**
59  Information about build context
60  */
62 
64 
66 
67  std::string Description;
68 
69  /**
70  Version number
71  */
73 
74  /**
75  Development status
76  */
78 
79  /**
80  Authors as a list of pairs [name,email]
81  */
83 
84 
85  // =====================================================================
86  // =====================================================================
87 
88 
90  {
91  clear();
92  }
93 
94 
95  // =====================================================================
96  // =====================================================================
97 
98 
99  void clear()
100  {
101  BuildInfo = SignatureBuildInfo();
102  ID.clear();
103  Name.clear();
104  Description.clear();
105  Version.clear();
107  Authors.clear();
108  }
109 
110 
111  // =====================================================================
112  // =====================================================================
113 
114 
115  virtual ~WareSignature()
116  {
117 
118  }
119 
120 
121  // =====================================================================
122  // =====================================================================
123 
124 
125  static std::string getStatusAsString(const WareStatus_t& Status)
126  {
127  std::string Str = "experimental";
128 
129  if (Status == WareStatus_t::BETA)
130  {
131  Str = "beta";
132  }
133  else if (Status == WareStatus_t::STABLE)
134  {
135  Str = "stable";
136  }
137 
138  return Str;
139  }
140 
141 };
142 
143 
144 } } // openfluid::ware
145 
146 
147 #endif /* __OPENFLUID_WARE_WARESIGNATURE_HPP__ */
openfluid::ware::STABLE
@ STABLE
Definition: TypeDefs.hpp:116
openfluid::ware::WareID_t
std::string WareID_t
Definition: TypeDefs.hpp:49
OPENFLUID_API
#define OPENFLUID_API
Definition: dllexport.hpp:86
openfluid::ware::WareSignature::WareSignature
WareSignature()
Definition: WareSignature.hpp:89
openfluid::ware::WareSignature
Definition: WareSignature.hpp:52
openfluid::ware::WareVersion_t
std::string WareVersion_t
Definition: TypeDefs.hpp:53
openfluid::ware::WareSignature::Name
WareName_t Name
Definition: WareSignature.hpp:65
openfluid::ware::WareSignature::BuildInfo
SignatureBuildInfo BuildInfo
Definition: WareSignature.hpp:61
openfluid::ware::WareSignature::ID
WareID_t ID
Definition: WareSignature.hpp:63
openfluid::ware::WareSignature::Version
WareVersion_t Version
Definition: WareSignature.hpp:72
openfluid::ware::WareName_t
std::string WareName_t
Definition: TypeDefs.hpp:51
openfluid::ware::WareSignature::Description
std::string Description
Definition: WareSignature.hpp:67
openfluid
Definition: ApplicationException.hpp:47
openfluid::ware::WareSignature::getStatusAsString
static std::string getStatusAsString(const WareStatus_t &Status)
Definition: WareSignature.hpp:125
openfluid::ware::WareSignature::Authors
AuthorsList_t Authors
Definition: WareSignature.hpp:82
openfluid::ware::EXPERIMENTAL
@ EXPERIMENTAL
Definition: TypeDefs.hpp:106
openfluid::ware::WareSignature::~WareSignature
virtual ~WareSignature()
Definition: WareSignature.hpp:115
openfluid::ware::WareSignature::AuthorsList_t
std::vector< std::pair< std::string, std::string > > AuthorsList_t
Definition: WareSignature.hpp:56
MiscHelpers.hpp
openfluid::ware::WareSignature::clear
void clear()
Definition: WareSignature.hpp:99
dllexport.hpp
openfluid::ware::WareStatus_t
WareStatus_t
Definition: TypeDefs.hpp:101
openfluid::ware::SignatureBuildInfo
Definition: TypeDefs.hpp:124
openfluid::ware::WareSignature::Status
WareStatus_t Status
Definition: WareSignature.hpp:77
openfluid::ware::BETA
@ BETA
Definition: TypeDefs.hpp:111