Dune Core Modules (2.8.0)

version.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_VERSION_HH
4#define DUNE_VERSION_HH
5
26#define DUNE_VERSION_JOIN(module,type) module ## _VERSION_ ## type
27
42#define DUNE_VERSION_EQUAL(module,major,minor) \
43 ((DUNE_VERSION_JOIN(module,MAJOR) == major) && \
44 (DUNE_VERSION_JOIN(module,MINOR) == minor))
45
60#define DUNE_VERSION_EQUAL_REV(module,major,minor,revision) \
61 ( DUNE_VERSION_EQUAL(module,major,minor) && \
62 (DUNE_VERSION_JOIN(module,REVISION) == revision))
63
78#define DUNE_VERSION_GTE(module,major,minor) \
79 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
80 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) >= minor)))
81
96#define DUNE_VERSION_LT(module,major,minor) \
97 ! DUNE_VERSION_GTE(module,major,minor)
98
114#define DUNE_VERSION_NEWER(module,major,minor) \
115 DUNE_VERSION_GTE(module,major,minor)
116
131#define DUNE_VERSION_GT(module,major,minor) \
132 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
133 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)))
134
149#define DUNE_VERSION_LTE(module,major,minor) \
150 ! DUNE_VERSION_GT(module,major,minor)
151
166#define DUNE_VERSION_GTE_REV(module,major,minor,revision) \
167 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
168 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)) \
169 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) == minor) \
170 && (DUNE_VERSION_JOIN(module,REVISION) >= revision)))
171
186#define DUNE_VERSION_LT_REV(module,major,minor,revision) \
187 ! DUNE_VERSION_GTE_REV(module,major,minor,revision)
188
204#define DUNE_VERSION_NEWER_REV(module,major,minor,revision) \
205 DUNE_VERSION_GTE_REV(module,major,minor,revision)
206
221#define DUNE_VERSION_GT_REV(module,major,minor,revision) \
222 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
223 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)) \
224 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) == minor) \
225 && (DUNE_VERSION_JOIN(module,REVISION) > revision)))
226
241#define DUNE_VERSION_LTE_REV(module,major,minor,revision) \
242 ! DUNE_VERSION_GT_REV(module,major,minor,revision)
243
258#define DUNE_VERSION_ID(major,minor,revision) \
259 ((unsigned int)((major << 24) + (minor << 16) + revision))
260
275#define DUNE_MODULE_VERSION_ID(module) \
276 DUNE_VERSION_ID( DUNE_VERSION_JOIN(module,MAJOR), DUNE_VERSION_JOIN(module,MINOR), DUNE_VERSION_JOIN(module,REVISION) )
277
278#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)