python
version.cc
Go to the documentation of this file.
1
//
2
// Copyright (c) 2019-2023 CNRS INRIA
3
//
4
5
#include "coal/config.hh"
6
#include "
coal.hh
"
7
#include <boost/preprocessor/stringize.hpp>
8
9
namespace
bp
=
boost::python
;
10
11
inline
bool
checkVersionAtLeast
(
int
major,
int
minor,
int
patch) {
12
return
COAL_VERSION_AT_LEAST(major, minor, patch);
13
}
14
15
inline
bool
checkVersionAtMost
(
int
major,
int
minor,
int
patch) {
16
return
COAL_VERSION_AT_MOST(major, minor, patch);
17
}
18
19
void
exposeVersion
() {
20
// Define release numbers of the current Coal version.
21
bp::scope().attr(
"__version__"
) =
22
BOOST_PP_STRINGIZE(COAL_MAJOR_VERSION)
"."
BOOST_PP_STRINGIZE(COAL_MINOR_VERSION)
"."
BOOST_PP_STRINGIZE(COAL_PATCH_VERSION);
23
bp::scope().attr(
"__raw_version__"
) = COAL_VERSION;
24
bp::scope().attr(
"COAL_MAJOR_VERSION"
) = COAL_MAJOR_VERSION;
25
bp::scope().attr(
"COAL_MINOR_VERSION"
) = COAL_MINOR_VERSION;
26
bp::scope().attr(
"COAL_PATCH_VERSION"
) = COAL_PATCH_VERSION;
27
28
#if COAL_HAS_QHULL
29
bp::scope().attr(
"WITH_QHULL"
) =
true
;
30
#else
31
bp::scope().attr(
"WITH_QHULL"
) =
false
;
32
#endif
33
34
#if COAL_HAS_OCTOMAP
35
bp::scope().attr(
"WITH_OCTOMAP"
) =
true
;
36
#else
37
bp::scope().attr(
"WITH_OCTOMAP"
) =
false
;
38
#endif
39
40
bp::def
(
"checkVersionAtLeast"
, &
checkVersionAtLeast
,
41
bp::args
(
"major"
,
"minor"
,
"patch"
),
42
"Checks if the current version of coal is at least"
43
" the version provided by the input arguments."
);
44
45
bp::def
(
"checkVersionAtMost"
, &
checkVersionAtMost
,
46
bp::args
(
"major"
,
"minor"
,
"patch"
),
47
"Checks if the current version of coal is at most"
48
" the version provided by the input arguments."
);
49
}
boost::python
coal.hh
exposeVersion
void exposeVersion()
Definition:
version.cc:19
doxygen::def
void def(const char *name, Func func)
Definition:
doxygen-boost.hh:106
doxygen_xml_parser.args
args
Definition:
doxygen_xml_parser.py:887
checkVersionAtMost
bool checkVersionAtMost(int major, int minor, int patch)
Definition:
version.cc:15
checkVersionAtLeast
bool checkVersionAtLeast(int major, int minor, int patch)
Definition:
version.cc:11
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:59