hpp-python: include/pyhpp/util.hh File Reference

hpp-python 9.0.2 python bindings for HPP, based on boost python

Classes | Namespaces | Macros | Functions
util.hh File Reference
`#include <boost/python.hpp>`
`#include <eigenpy/eigenpy.hpp>`
`#include <hpp/util/pointer.hh>`
`#include <vector>`
Include dependency graph for util.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | pyhpp::VectorOfPtr< T, _Vector >

## Namespaces
namespace | pyhpp

## Macros
#define | INIT_PYHPP_MODULE boost::python::docstring_options local_docstring_options(true, true, false)
#define | PYHPP_DEFINE_METHOD(CLASS, METHOD) def(#METHOD, &CLASS::METHOD)
#define | PYHPP_DEFINE_METHOD1(CLASS, METHOD, ARG1) def(#METHOD, &CLASS::METHOD, ARG1)
#define | PYHPP_DEFINE_METHOD2(CLASS, METHOD, ARG1, ARG2) def(#METHOD, &CLASS::METHOD, ARG1, ARG2)
#define | PYHPP_DEFINE_METHOD_INTERNAL_REF(CLASS, METHOD) def(#METHOD, &CLASS::METHOD, return_internal_reference<>())
#define | PYHPP_DEFINE_METHOD_CONST_REF(CLASS, METHOD) def(#METHOD, &CLASS::METHOD, return_value_policy<copy_const_reference>())
#define | PYHPP_DEFINE_METHOD_CONST_REF_BY_VALUE(CLASS, METHOD) def(#METHOD, &CLASS::METHOD, return_value_policy<return_by_value>())
#define | PYHPP_DEFINE_GETTER_SETTER(CLASS, METHOD, TYPE)
#define | PYHPP_DEFINE_GETTER_SETTER_INTERNAL_REF(CLASS, METHOD, TYPE)
#define | PYHPP_DEFINE_GETTER_SETTER_CONST_REF(CLASS, METHOD, TYPE)
#define | PYHPP_DEFINE_METHOD_STATIC(CLASS, METHOD) def(#METHOD, &CLASS::METHOD).staticmethod(#METHOD)

## Functions
template<typename ObjectWithPrintMethod >
std::string | pyhpp::to_str (const ObjectWithPrintMethod &obj)
template<typename ObjectWithPrintMethod >
std::string | pyhpp::to_str_from_operator (const ObjectWithPrintMethod &obj)
template<typename T >
std::vector< T > | pyhpp::extract_vector (boost::python::list py_list)
template<typename T >
boost::python::list | pyhpp::to_python_list (const std::vector< T > &vec)

## Macro Definition Documentation

## ◆ INIT_PYHPP_MODULE

#define INIT_PYHPP_MODULE boost::python::docstring_options local_docstring_options(true, true, false)

## ◆ PYHPP_DEFINE_GETTER_SETTER

#define PYHPP_DEFINE_GETTER_SETTER | ( |  | CLASS,
|  |  | METHOD,
|  |  | TYPE
| ) |  |

Value:
def(#METHOD, static_cast<TYPE (CLASS::*)() const>(&CLASS::METHOD)) \
.def(#METHOD, static_cast<void (CLASS::*)(TYPE)>(&CLASS::METHOD))

## ◆ PYHPP_DEFINE_GETTER_SETTER_CONST_REF

#define PYHPP_DEFINE_GETTER_SETTER_CONST_REF | ( |  | CLASS,
|  |  | METHOD,
|  |  | TYPE
| ) |  |

Value:
def(#METHOD, static_cast<TYPE (CLASS::*)() const>(&CLASS::METHOD)) \
.def(#METHOD, static_cast<void (CLASS::*)(const TYPE&)>(&CLASS::METHOD))

## ◆ PYHPP_DEFINE_GETTER_SETTER_INTERNAL_REF

#define PYHPP_DEFINE_GETTER_SETTER_INTERNAL_REF | ( |  | CLASS,
|  |  | METHOD,
|  |  | TYPE
| ) |  |

Value:
def(#METHOD, static_cast<TYPE (CLASS::*)() const>(&CLASS::METHOD), \
return_internal_reference<>()) \
.def(#METHOD, static_cast<void (CLASS::*)(TYPE)>(&CLASS::METHOD))

## ◆ PYHPP_DEFINE_METHOD

#define PYHPP_DEFINE_METHOD | ( |  | CLASS,
|  |  | METHOD
| ) |  | def(#METHOD, &CLASS::METHOD)

## ◆ PYHPP_DEFINE_METHOD1

#define PYHPP_DEFINE_METHOD1 | ( |  | CLASS,
|  |  | METHOD,
|  |  | ARG1
| ) |  | def(#METHOD, &CLASS::METHOD, ARG1)

## ◆ PYHPP_DEFINE_METHOD2

#define PYHPP_DEFINE_METHOD2 | ( |  | CLASS,
|  |  | METHOD,
|  |  | ARG1,
|  |  | ARG2
| ) |  | def(#METHOD, &CLASS::METHOD, ARG1, ARG2)

## ◆ PYHPP_DEFINE_METHOD_CONST_REF

#define PYHPP_DEFINE_METHOD_CONST_REF | ( |  | CLASS,
|  |  | METHOD
| ) |  | def(#METHOD, &CLASS::METHOD, return_value_policy<copy_const_reference>())

## ◆ PYHPP_DEFINE_METHOD_CONST_REF_BY_VALUE

#define PYHPP_DEFINE_METHOD_CONST_REF_BY_VALUE | ( |  | CLASS,
|  |  | METHOD
| ) |  | def(#METHOD, &CLASS::METHOD, return_value_policy<return_by_value>())

## ◆ PYHPP_DEFINE_METHOD_INTERNAL_REF

#define PYHPP_DEFINE_METHOD_INTERNAL_REF | ( |  | CLASS,
|  |  | METHOD
| ) |  | def(#METHOD, &CLASS::METHOD, return_internal_reference<>())

## ◆ PYHPP_DEFINE_METHOD_STATIC

#define PYHPP_DEFINE_METHOD_STATIC | ( |  | CLASS,
|  |  | METHOD
| ) |  | def(#METHOD, &CLASS::METHOD).staticmethod(#METHOD)