bindings/python/utils/version.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2018 CNRS, INRIA
3 //
4 
7 #include "pinocchio/utils/version.hpp"
8 
9 #include <boost/python.hpp>
10 
11 namespace pinocchio
12 {
13  namespace python
14  {
15 
16  namespace bp = boost::python;
17 
18  BOOST_PYTHON_FUNCTION_OVERLOADS(printVersion_overload, printVersion, 0, 1)
19 
21  {
22  // Define release numbers of the current Pinocchio version.
23  bp::def_constant("PINOCCHIO_MAJOR_VERSION",PINOCCHIO_MAJOR_VERSION);
24  bp::def_constant("PINOCCHIO_MINOR_VERSION",PINOCCHIO_MINOR_VERSION);
25  bp::def_constant("PINOCCHIO_PATCH_VERSION",PINOCCHIO_PATCH_VERSION);
26 
27  bp::def("printVersion",printVersion,
28  printVersion_overload(bp::arg("delimiter"),
29  "Returns the current version of Pinocchio as a string.\n"
30  "The user may specify the delimiter between the different semantic numbers.")
31  );
32 
33  bp::def("checkVersionAtLeast",&checkVersionAtLeast,
34  bp::args("major","minor","patch"),
35  "Checks if the current version of Pinocchio is at least"
36  " the version provided by the input arguments.");
37  }
38 
39  } // namespace python
40 } // namespace pinocchio
void def_constant(const char *name, const T &value)
Define a constant given its value and a name within the current Boost Python scope.
Definition: constant.hpp:24
BOOST_PYTHON_FUNCTION_OVERLOADS(computeKKTContactDynamicMatrixInverse_overload, computeKKTContactDynamicMatrixInverse_proxy, 4, 5) static const Eigen
bool checkVersionAtLeast(unsigned int major_version, unsigned int minor_version, unsigned int patch_version)
Checks if the current version of Pinocchio is at least the version provided by the input arguments...
std::string printVersion(const std::string &delimiter=".")
Returns the current version of Pinocchio as a string using the following standard: PINOCCHIO_MINOR_VE...
Main pinocchio namespace.
Definition: timings.cpp:30


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:05