![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <cloudViewer_pybind.h>

Public Types | |
| using | value_conv = make_caster< typename T::value_type > |
Public Member Functions | |
| bool | load (handle src, bool convert) |
| PYBIND11_TYPE_CASTER (T, _("Optional[")+value_conv::name+_("]")) | |
Static Public Member Functions | |
| template<typename T_ > | |
| static handle | cast (T_ &&src, return_value_policy policy, handle parent) |
Custom pybind11 type caster for cloudViewer::utility::optional, which backports C++17's std::optional. We need compiler supporting C++14 or newer. Typically, this can be used to handle "None" parameters from Python.
Example python function:
Here's the equivalent C++ implementation:
Then this function can be called with:
Definition at line 149 of file cloudViewer_pybind.h.
| using pybind11::detail::cloudViewer_optional_caster< T >::value_conv = make_caster<typename T::value_type> |
Definition at line 150 of file cloudViewer_pybind.h.
|
inlinestatic |
Definition at line 153 of file cloudViewer_pybind.h.
|
inline |
Definition at line 161 of file cloudViewer_pybind.h.
References convert().
| pybind11::detail::cloudViewer_optional_caster< T >::PYBIND11_TYPE_CASTER | ( | T | , |
| _("Optional[")+value_conv::name+_("]") | |||
| ) |