Bayeux  3.4.1
Core Foundation library for SuperNEMO
version.h
Go to the documentation of this file.
1 //
7 // Copyright (c) 2013 by Ben Morgan <bmorgan.warwick@gmail.com>
8 // Copyright (c) 2013 by The University of Warwick
9 //
10 // This file is part of genbb_help.
11 //
12 // genbb_help is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // genbb_help is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with genbb_help. If not, see <http://www.gnu.org/licenses/>.
24 
25 #ifndef GENBB_HELP_VERSION_H
26 #define GENBB_HELP_VERSION_H
27 
28 // Standard Library:
29 #include <string>
30 
31 //----------------------------------------------------------------------
32 // - Compile Time API
34 #define GENBB_HELP_VERSION_MAJOR 6
35 
37 #define GENBB_HELP_VERSION_MINOR 2
38 
40 #define GENBB_HELP_VERSION_PATCH 0
41 
43 #define GENBB_HELP_ENCODE_VERSION(major, minor, patch) ( \
44  ((major) * 10000) \
45  + ((minor) * 100) \
46  + ((patch) * 1))
47 
49 #define GENBB_HELP_VERSION GENBB_HELP_ENCODE_VERSION( \
50  GENBB_HELP_VERSION_MAJOR, \
51  GENBB_HELP_VERSION_MINOR, \
52  GENBB_HELP_VERSION_PATCH)
53 
55 #define GENBB_HELP_LIB_VERSION "6.2.0"
56 
58 #define GENBB_HELP_IS_AT_LEAST(major,minor,patch) ( \
59  GENBB_HELP_VERSION >= \
60  GENBB_HELP_ENCODE_VERSION(major,minor,patch))
61 
62 //----------------------------------------------------------------------
63 // Runtime API
64 namespace genbb {
65 
67  struct version {
69  static int get_major();
70 
72  static int get_minor();
73 
75  static int get_patch();
76 
78  static std::string get_version();
79 
81  static bool is_at_least(int major, int minor, int patch);
82 
84  static bool has_feature(const std::string& feature);
85  };
86 
87 } // namespace genbb
88 
89 #endif // GENBB_HELP_VERSION_H
90 
91 // Local Variables: --
92 // mode: c++ --
93 // End: --
static bool has_feature(const std::string &feature)
Return true if the named feature is available in genbb_help.
static std::string get_version()
Return the full version number of genbb_help as a string, e.g., '1.2.3'.
Describe the genbb_help API version and features.
Definition: version.h:67
static int get_minor()
Return the minor version number of genbb_help, e.g., 2 for '1.2.3'.
static int get_major()
Return the major version number of genbb_help, e.g., 1 for '1.2.3'.
static bool is_at_least(int major, int minor, int patch)
Return true if the current genbb_help version >= (major, minor, patch)
Top-level namespace of the Bayeux/genbb_help module library.
Definition: alpha_decay.h:51
static int get_patch()
Return the patch version number of genbb_help, e.g., 3 for '1.2.3'.