1292 |
11 May 08 |
peter |
1 |
#ifndef _theplu_yat_utility_version_ |
4200 |
19 Aug 22 |
peter |
2 |
#define _theplu_yat_utility_version_ |
1292 |
11 May 08 |
peter |
3 |
|
1292 |
11 May 08 |
peter |
// $Id$ |
1292 |
11 May 08 |
peter |
5 |
|
1292 |
11 May 08 |
peter |
6 |
/* |
2119 |
12 Dec 09 |
peter |
Copyright (C) 2008 Jari Häkkinen, Peter Johansson |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2009, 2011 Peter Johansson |
1292 |
11 May 08 |
peter |
9 |
|
2124 |
19 Dec 09 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
1292 |
11 May 08 |
peter |
11 |
|
1292 |
11 May 08 |
peter |
The yat library is free software; you can redistribute it and/or |
1292 |
11 May 08 |
peter |
modify it under the terms of the GNU General Public License as |
1486 |
09 Sep 08 |
jari |
published by the Free Software Foundation; either version 3 of the |
1292 |
11 May 08 |
peter |
License, or (at your option) any later version. |
1292 |
11 May 08 |
peter |
16 |
|
1292 |
11 May 08 |
peter |
The yat library is distributed in the hope that it will be useful, |
1292 |
11 May 08 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1292 |
11 May 08 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1292 |
11 May 08 |
peter |
General Public License for more details. |
1292 |
11 May 08 |
peter |
21 |
|
1292 |
11 May 08 |
peter |
You should have received a copy of the GNU General Public License |
1487 |
10 Sep 08 |
jari |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
1292 |
11 May 08 |
peter |
24 |
*/ |
1292 |
11 May 08 |
peter |
25 |
|
1292 |
11 May 08 |
peter |
26 |
/// |
1292 |
11 May 08 |
peter |
/// \file utility/version.h |
1292 |
11 May 08 |
peter |
28 |
/// |
1292 |
11 May 08 |
peter |
29 |
|
1321 |
23 May 08 |
peter |
30 |
/* |
4200 |
19 Aug 22 |
peter |
Compile-time version constants |
1321 |
23 May 08 |
peter |
32 |
|
1321 |
23 May 08 |
peter |
\see http://apr.apache.org/versioning.html |
1321 |
23 May 08 |
peter |
34 |
*/ |
1328 |
24 May 08 |
peter |
35 |
|
2431 |
06 Mar 11 |
peter |
36 |
#include "config_public.h" |
1328 |
24 May 08 |
peter |
37 |
|
1328 |
24 May 08 |
peter |
38 |
/** |
1416 |
18 Aug 08 |
peter |
Check at compile time if the version of yat is at least a certain |
1416 |
18 Aug 08 |
peter |
level. |
1416 |
18 Aug 08 |
peter |
@param major The major version component of the version checked |
1416 |
18 Aug 08 |
peter |
for (e.g., the "0" of "0.5.1"). |
1416 |
18 Aug 08 |
peter |
@param minor The minor version component of the version checked |
1416 |
18 Aug 08 |
peter |
for (e.g., the "5" of "0.5.1"). |
1416 |
18 Aug 08 |
peter |
@param patch The patch level component of the version checked |
1416 |
18 Aug 08 |
peter |
for (e.g., the "1" of "0.5.1"). |
1416 |
18 Aug 08 |
peter |
47 |
|
1416 |
18 Aug 08 |
peter |
\since New in yat 0.5 |
1416 |
18 Aug 08 |
peter |
49 |
*/ |
1416 |
18 Aug 08 |
peter |
50 |
#define YAT_VERSION_AT_LEAST(major,minor,patch) \ |
1416 |
18 Aug 08 |
peter |
51 |
(((major) < YAT_MAJOR_VERSION) || \ |
1416 |
18 Aug 08 |
peter |
52 |
((major) == YAT_MAJOR_VERSION && (minor) < YAT_MINOR_VERSION) || \ |
1416 |
18 Aug 08 |
peter |
53 |
((major) == YAT_MAJOR_VERSION && (minor) == YAT_MINOR_VERSION &&\ |
1416 |
18 Aug 08 |
peter |
54 |
(patch) <= YAT_PATCH_VERSION)) |
1416 |
18 Aug 08 |
peter |
55 |
|
1292 |
11 May 08 |
peter |
56 |
#include <string> |
1292 |
11 May 08 |
peter |
57 |
|
1292 |
11 May 08 |
peter |
58 |
namespace theplu { |
1292 |
11 May 08 |
peter |
59 |
namespace yat { |
1292 |
11 May 08 |
peter |
60 |
namespace utility { |
1292 |
11 May 08 |
peter |
61 |
|
1292 |
11 May 08 |
peter |
62 |
/** |
1292 |
11 May 08 |
peter |
\return major version number of compiled yat library |
1339 |
06 Jun 08 |
peter |
64 |
|
1339 |
06 Jun 08 |
peter |
\since New in yat 0.5 |
1292 |
11 May 08 |
peter |
66 |
*/ |
1292 |
11 May 08 |
peter |
67 |
unsigned int major_version(void); |
1292 |
11 May 08 |
peter |
68 |
|
1292 |
11 May 08 |
peter |
69 |
/** |
1292 |
11 May 08 |
peter |
\return minor version number of compiled yat library |
1339 |
06 Jun 08 |
peter |
71 |
|
1339 |
06 Jun 08 |
peter |
\since New in yat 0.5 |
1292 |
11 May 08 |
peter |
73 |
*/ |
1292 |
11 May 08 |
peter |
74 |
unsigned int minor_version(void); |
1292 |
11 May 08 |
peter |
75 |
|
1292 |
11 May 08 |
peter |
76 |
/** |
1292 |
11 May 08 |
peter |
\return patch version number of compiled yat library |
1339 |
06 Jun 08 |
peter |
78 |
|
1339 |
06 Jun 08 |
peter |
\since New in yat 0.5 |
1292 |
11 May 08 |
peter |
80 |
*/ |
1292 |
11 May 08 |
peter |
81 |
unsigned int patch_version(void); |
1292 |
11 May 08 |
peter |
82 |
|
1292 |
11 May 08 |
peter |
83 |
/** |
1292 |
11 May 08 |
peter |
\return version number of compiled yat library |
1339 |
06 Jun 08 |
peter |
85 |
|
1339 |
06 Jun 08 |
peter |
\since New in yat 0.5 |
1292 |
11 May 08 |
peter |
87 |
*/ |
1292 |
11 May 08 |
peter |
88 |
std::string version(void); |
1292 |
11 May 08 |
peter |
89 |
|
1292 |
11 May 08 |
peter |
90 |
}}} // of namespace utility, yat, and theplu |
1292 |
11 May 08 |
peter |
91 |
|
1292 |
11 May 08 |
peter |
92 |
#endif |