include/pinocchio/bindings/python/utils/macros.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 INRIA
3 //
4 
5 #ifndef __pinocchio_python_utils_macros_hpp__
6 #define __pinocchio_python_utils_macros_hpp__
7 
8 #define PINOCCHIO_ADD_PROPERTY(STRUCT_NAME, PROPERTY_NAME, DOC) \
9  def_readwrite(#PROPERTY_NAME, &STRUCT_NAME::PROPERTY_NAME, DOC)
10 
11 #define PINOCCHIO_ADD_PROPERTY_READONLY(STRUCT_NAME, PROPERTY_NAME, DOC) \
12  def_readonly(#PROPERTY_NAME, &STRUCT_NAME::PROPERTY_NAME, DOC)
13 
14 #define PINOCCHIO_ADD_PROPERTY_READONLY_BYVALUE(STRUCT_NAME, PROPERTY_NAME, DOC) \
15  add_property( \
16  #PROPERTY_NAME, \
17  make_getter( \
18  &STRUCT_NAME::PROPERTY_NAME, \
19  ::boost::python::return_value_policy<::boost::python::return_by_value>()), \
20  DOC)
21 
22 #define PINOCCHIO_ADD_STATIC_PROPERTY_READONLY_BYVALUE(STRUCT_NAME, PROPERTY_NAME, DOC) \
23  add_static_property( \
24  #PROPERTY_NAME, \
25  make_getter( \
26  &STRUCT_NAME::PROPERTY_NAME, \
27  ::boost::python::return_value_policy<::boost::python::return_by_value>()), \
28  DOC)
29 
30 #endif // ifndef __pinocchio_python_utils_macros_hpp__


pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:47