5 #ifndef __pinocchio_python_utils_std_aligned_vector_hpp__ 6 #define __pinocchio_python_utils_std_aligned_vector_hpp__ 8 #include <boost/python.hpp> 9 #include <boost/python/suite/indexing/vector_indexing_suite.hpp> 12 #include "pinocchio/container/aligned-vector.hpp" 30 template<
class T,
bool NoProxy = false,
bool EnableFromPythonListConverter = true>
32 :
public ::boost::python::vector_indexing_suite<typename container::aligned_vector<T>,NoProxy>
38 static ::boost::python::class_<vector_type>
expose(
const std::string & class_name,
39 const std::string & doc_string =
"")
43 bp::class_<vector_type>
cl(class_name.c_str(),doc_string.c_str());
47 "Returns the aligned_vector as a Python list.")
51 if(EnableFromPythonListConverter)
60 #endif // ifndef __pinocchio_python_utils_std_aligned_vector_hpp__ ::boost::python::list tolist(vector_type &self)
static ::boost::python::class_< vector_type > expose(const std::string &class_name, const std::string &doc_string="")
StdContainerFromPythonList< vector_type > FromPythonListConverter
Expose an container::aligned_vector from a type given as template argument.
Register the conversion from a Python list to a std::vector.
static void register_converter()
Specialization of an std::vector with an aligned allocator. This specialization might be used when th...
Create a pickle interface for the std::vector and aligned vector.
container::aligned_vector< T > vector_type
Main pinocchio namespace.