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 mygsl.
11 //
12 // mygsl 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 // mygsl 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 mygsl. If not, see <http://www.gnu.org/licenses/>.
24 
25 #ifndef MYGSL_VERSION_H
26 #define MYGSL_VERSION_H
27 
28 // Standard Library:
29 #include <string>
30 
31 // - Compile Time API
33 #define MYGSL_VERSION_MAJOR 6
34 
36 #define MYGSL_VERSION_MINOR 2
37 
39 #define MYGSL_VERSION_PATCH 0
40 
42 #define MYGSL_ENCODE_VERSION(major, minor, patch) ( \
43  ((major) * 10000) \
44  + ((minor) * 100) \
45  + ((patch) * 1))
46 
48 #define MYGSL_VERSION MYGSL_ENCODE_VERSION( \
49  MYGSL_VERSION_MAJOR, \
50  MYGSL_VERSION_MINOR, \
51  MYGSL_VERSION_PATCH)
52 
54 #define MYGSL_LIB_VERSION "6.2.0"
55 
57 #define MYGSL_IS_AT_LEAST(major,minor,patch) ( \
58  MYGSL_VERSION >= \
59  MYGSL_ENCODE_VERSION(major,minor,patch))
60 
61 //----------------------------------------------------------------------
62 // Runtime API
63 namespace mygsl {
65  struct version {
67  static int get_major();
68 
70  static int get_minor();
71 
73  static int get_patch();
74 
76  static std::string get_version();
77 
79  static bool is_at_least(int major, int minor, int patch);
80 
82  static bool has_feature(const std::string& feature);
83  };
84 } // namespace mygsl
85 
86 #endif // MYGSL_VERSION_H
87 
88 /* Local Variables: */
89 /* mode: c++ */
90 /* coding: utf-8 */
91 /* End: */
static bool is_at_least(int major, int minor, int patch)
Return true if the current mygsl version >= (major, minor, patch)
static std::string get_version()
Return the full version number of mygsl as a string, e.g., '1.2.3'.
static int get_major()
Return the major version number of mygsl, e.g., 1 for '1.2.3'.
static int get_patch()
Return the patch version number of mygsl, e.g., 3 for '1.2.3'.
Describe the mygsl API version and features.
Definition: version.h:65
static int get_minor()
Return the minor version number of mygsl, e.g., 2 for '1.2.3'.
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
static bool has_feature(const std::string &feature)
Return true if the named feature is available in mygsl.