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 dpp.
11 //
12 // dpp 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 // dpp 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 dpp. If not, see <http://www.gnu.org/licenses/>.
24 
25 #ifndef DPP_VERSION_H
26 #define DPP_VERSION_H
27 
28 // Standard Library:
29 #include <string>
30 
31 //----------------------------------------------------------------------
32 // - Compile Time API
34 #define DPP_VERSION_MAJOR 3
35 
37 #define DPP_VERSION_MINOR 2
38 
40 #define DPP_VERSION_PATCH 0
41 
43 #define DPP_ENCODE_VERSION(major_, minor_, patch_) (((major_) * 10000) \
44  + ((minor_) * 100) \
45  + ((patch_) * 1))
46 
48 #define DPP_VERSION DPP_ENCODE_VERSION(DPP_VERSION_MAJOR, \
49  DPP_VERSION_MINOR, \
50  DPP_VERSION_PATCH)
51 
53 #define DPP_LIB_VERSION "3.2.0"
54 
56 #define DPP_IS_AT_LEAST(major,minor,patch) (DPP_VERSION >= \
57  DPP_ENCODE_VERSION(major,minor,patch))
58 
59 //----------------------------------------------------------------------
60 // Runtime API
61 namespace dpp {
62 
64  struct version {
66  static int get_major();
67 
69  static int get_minor();
70 
72  static int get_patch();
73 
75  static std::string get_version();
76 
78  static bool is_at_least(int major_, int minor_, int patch_);
79 
81  static bool has_feature(const std::string & feature_);
82  };
83 
84 } // namespace dpp
85 
86 #endif // DPP_VERSION_H
87 
88 // Local Variables: --
89 // mode: c++ --
90 // c-file-style: "gnu" --
91 // tab-width: 2 --
92 // End: --
static int get_patch()
Return the patch version number of dpp, e.g., 3 for '1.2.3'.
Top-level namespace of the Bayeux/dpp module library.
Definition: base_module.h:56
static int get_minor()
Return the minor version number of dpp, e.g., 2 for '1.2.3'.
static int get_major()
Return the major version number of dpp, e.g., 1 for '1.2.3'.
static bool is_at_least(int major_, int minor_, int patch_)
Return true if the current dpp version >= (major, minor, patch)
static std::string get_version()
Return the full version number of dpp as a string, e.g., '1.2.3'.
static bool has_feature(const std::string &feature_)
Return true if the named feature is available in dpp.
Describe the dpp API version and features.
Definition: version.h:64