Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
bindings
python
utils
constant.hpp
Go to the documentation of this file.
1
//
2
// Copyright (c) 2018 CNRS
3
//
4
5
#ifndef __pinocchio_python_utils_constant_hpp__
6
#define __pinocchio_python_utils_constant_hpp__
7
8
#include <boost/python/scope.hpp>
9
10
namespace
boost
11
{
12
namespace
python
13
{
14
23
template
<
typename
T>
24
void
def_constant
(
const
char
*
name
,
const
T
& value)
25
{
26
namespace
bp
=
boost::python
;
27
bp::scope().attr(name) = value;
28
}
29
30
}
// namespace python
31
}
// namespace boost
32
33
#endif // ifndef __pinocchio_python_utils_constant_hpp__
boost
simulation-pendulum.T
int T
Definition:
simulation-pendulum.py:113
boost::python::def_constant
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
compile.name
name
Definition:
cmake/compile.py:22
boost::python
python
Definition:
cmake/_unittests/python/jrl_cmakemodule/python.py:1
pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:02