#include <variant.hpp>
Public Types | |
typedef ReturnInternalVariant< variant_type > | return_internal_reference |
typedef Variant | variant_type |
Static Public Member Functions | |
static void | registration () |
Define a defaults converter to convert a {boost,std}::variant alternative to a Python object by copy and to convert implicitly an alternative to a {boost,std}::variant.
Example:
typedef boost::variant<Struct1, Struct2> MyVariant; struct VariantHolder { MyVariant variant; }; ... void expose() { bp::class_<Struct1>("Struct1", bp::init<>()); bp::class_<Struct2>("Struct1", bp::init<>()) typedef eigenpy::VariantConverter<MyVariant> Converter; Converter::registration();
bp::class_<VariantHolder>("VariantHolder", bp::init<>()) .add_property("variant", bp::make_getter(&VariantHolder::variant, Converter::return_internal_reference()), bp::make_setter(&VariantHolder::variant)); }
Definition at line 337 of file variant.hpp.
typedef ReturnInternalVariant<variant_type> eigenpy::VariantConverter< Variant >::return_internal_reference |
Definition at line 339 of file variant.hpp.
typedef Variant eigenpy::VariantConverter< Variant >::variant_type |
Definition at line 338 of file variant.hpp.
|
inlinestatic |
Definition at line 341 of file variant.hpp.