source: trunk/yat/utility/version.h.in @ 2140

Last change on this file since 2140 was 2140, checked in by Peter, 13 years ago

updating copyright. Happy New Year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1#ifndef _theplu_yat_utility_version_
2#define _theplu_yat_utility_version_
3
4// @configure_input@
5
6// $Id: version.h.in 2140 2009-12-31 22:43:29Z peter $
7
8/*
9  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
10  Copyright (C) 2009 Peter Johansson
11
12  This file is part of the yat library, http://dev.thep.lu.se/yat
13
14  The yat library is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License as
16  published by the Free Software Foundation; either version 3 of the
17  License, or (at your option) any later version.
18
19  The yat library is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  General Public License for more details.
23
24  You should have received a copy of the GNU General Public License
25  along with yat. If not, see <http://www.gnu.org/licenses/>.
26*/
27
28///
29/// \file utility/version.h
30///
31
32/*
33  Compile-time version constants
34
35  \see http://apr.apache.org/versioning.html
36*/
37
38/**
39   MAJOR version
40
41   No compatibility is guarenteed between MAJOR versions.
42
43   \since New in yat 0.5
44 */
45#define YAT_MAJOR_VERSION @YAT_MAJOR_VERSION@
46
47/**
48   MINOR version
49
50   Minor API changes that do not cause binary compatibility problems.
51   Reset to 0 when upgrading YAT_MAJOR_VERSION
52
53   \since New in yat 0.5
54 */
55#define YAT_MINOR_VERSION @YAT_MINOR_VERSION@
56
57/**
58   PATCH version
59
60   The Patch level never includes API changes, simply bug fixes.
61   Reset to 0 when upgrading YAT_MINOR_VERSION
62
63   \since New in yat 0.5
64 */
65#define YAT_PATCH_VERSION @YAT_PATCH_VERSION@
66
67/**
68   VERSION
69
70   The version of yat in string format
71
72   \since New in yat 0.5
73 */
74#define YAT_VERSION "@VERSION@"
75
76/**
77   DEV_BUILD
78
79   Is set to false in releases
80
81   \since New in yat 0.5
82 */
83#define YAT_DEV_BUILD @YAT_DEV_BUILD@
84
85/**
86   Check at compile time if the version of yat is at least a certain
87   level.
88   @param major The major version component of the version checked
89   for (e.g., the "0" of "0.5.1").
90   @param minor The minor version component of the version checked
91   for (e.g., the "5" of "0.5.1").
92   @param patch The patch level component of the version checked
93   for (e.g., the "1" of "0.5.1").
94
95   \since New in yat 0.5
96 */
97#define YAT_VERSION_AT_LEAST(major,minor,patch)                    \
98(((major) < YAT_MAJOR_VERSION) ||                                    \
99 ((major) == YAT_MAJOR_VERSION && (minor) < YAT_MINOR_VERSION) || \
100 ((major) == YAT_MAJOR_VERSION && (minor) == YAT_MINOR_VERSION &&\
101  (patch) <= YAT_PATCH_VERSION))
102
103#include <string>
104
105namespace theplu {
106namespace yat {
107namespace utility {
108
109  /**
110     \return major version number of compiled yat library
111
112   \since New in yat 0.5
113   */
114  unsigned int major_version(void);
115
116  /**
117     \return minor version number of compiled yat library
118
119     \since New in yat 0.5
120   */
121  unsigned int minor_version(void);
122
123  /**
124     \return patch version number of compiled yat library
125
126     \since New in yat 0.5
127   */
128  unsigned int patch_version(void);
129
130  /**
131     \return version number of compiled yat library
132
133     \since New in yat 0.5
134   */
135  std::string version(void);
136
137}}} // of namespace utility, yat, and theplu
138
139#endif
Note: See TracBrowser for help on using the repository browser.