μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
argument_loader< Args > Class Template Reference

Helper class which loads arguments for C++ functions called from Python. More...

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/cast.h>

Public Member Functions

bool load_args (function_call &call)
 
template<typename Return , typename Guard , typename Func >
enable_if_t<!std::is_void< Return >::value, Return > call (Func &&f) &&
 
template<typename Return , typename Guard , typename Func >
enable_if_t< std::is_void< Return >::value, void_typecall (Func &&f) &&
 
bool load_args (function_call &call)
 
template<typename Return , typename Guard , typename Func >
enable_if_t<!std::is_void< Return >::value, Return > call (Func &&f) &&
 
template<typename Return , typename Guard , typename Func >
enable_if_t< std::is_void< Return >::value, void_typecall (Func &&f) &&
 

Static Public Attributes

static constexpr bool has_kwargs = kwargs_pos != -1
 
static constexpr int args_pos = constexpr_last<argument_is_args, Args...>()
 
static constexpr auto arg_names = concat(type_descr(make_caster<Args>::name)...)
 

Private Types

using indices = make_index_sequence< sizeof...(Args)>
 
template<typename Arg >
using argument_is_args = std::is_same< intrinsic_t< Arg >, args >
 
template<typename Arg >
using argument_is_kwargs = std::is_same< intrinsic_t< Arg >, kwargs >
 
using indices = make_index_sequence< sizeof...(Args)>
 
template<typename Arg >
using argument_is_args = std::is_same< intrinsic_t< Arg >, args >
 
template<typename Arg >
using argument_is_kwargs = std::is_same< intrinsic_t< Arg >, kwargs >
 

Private Member Functions

template<size_t... Is>
bool load_impl_sequence (function_call &call, index_sequence< Is... >)
 
template<typename Return , typename Func , size_t... Is, typename Guard >
Return call_impl (Func &&f, index_sequence< Is... >, Guard &&) &&
 
template<size_t... Is>
bool load_impl_sequence (function_call &call, index_sequence< Is... >)
 
template<typename Return , typename Func , size_t... Is, typename Guard >
Return call_impl (Func &&f, index_sequence< Is... >, Guard &&) &&
 

Static Private Member Functions

static bool load_impl_sequence (function_call &, index_sequence<>)
 
static bool load_impl_sequence (function_call &, index_sequence<>)
 

Private Attributes

std::tuple< make_caster< Args >... > argcasters
 

Static Private Attributes

static constexpr auto kwargs_pos = constexpr_last<argument_is_kwargs, Args...>()
 

Detailed Description

template<typename... Args>
class argument_loader< Args >

Helper class which loads arguments for C++ functions called from Python.

Definition at line 1380 of file cast.h.

Member Typedef Documentation

◆ argument_is_args [1/2]

template<typename... Args>
template<typename Arg >
using argument_loader< Args >::argument_is_args = std::is_same<intrinsic_t<Arg>, args>
private

Definition at line 1384 of file cast.h.

◆ argument_is_args [2/2]

template<typename... Args>
template<typename Arg >
using argument_loader< Args >::argument_is_args = std::is_same<intrinsic_t<Arg>, args>
private

Definition at line 1386 of file cast.h.

◆ argument_is_kwargs [1/2]

template<typename... Args>
template<typename Arg >
using argument_loader< Args >::argument_is_kwargs = std::is_same<intrinsic_t<Arg>, kwargs>
private

Definition at line 1386 of file cast.h.

◆ argument_is_kwargs [2/2]

template<typename... Args>
template<typename Arg >
using argument_loader< Args >::argument_is_kwargs = std::is_same<intrinsic_t<Arg>, kwargs>
private

Definition at line 1388 of file cast.h.

◆ indices [1/2]

template<typename... Args>
using argument_loader< Args >::indices = make_index_sequence<sizeof...(Args)>
private

Definition at line 1381 of file cast.h.

◆ indices [2/2]

template<typename... Args>
using argument_loader< Args >::indices = make_index_sequence<sizeof...(Args)>
private

Definition at line 1383 of file cast.h.

Member Function Documentation

◆ call() [1/4]

template<typename... Args>
template<typename Return , typename Guard , typename Func >
enable_if_t<!std::is_void< Return >::value, Return > argument_loader< Args >::call ( Func &&  f) &&
inline

◆ call() [2/4]

template<typename... Args>
template<typename Return , typename Guard , typename Func >
enable_if_t< std::is_void< Return >::value, void_type > argument_loader< Args >::call ( Func &&  f) &&
inline

Definition at line 1414 of file cast.h.

References argument_loader< Args >::call_impl().

◆ call() [3/4]

template<typename... Args>
template<typename Return , typename Guard , typename Func >
enable_if_t<!std::is_void< Return >::value, Return > argument_loader< Args >::call ( Func &&  f) &&
inline

Definition at line 1410 of file cast.h.

References argument_loader< Args >::call_impl().

◆ call() [4/4]

template<typename... Args>
template<typename Return , typename Guard , typename Func >
enable_if_t< std::is_void< Return >::value, void_type > argument_loader< Args >::call ( Func &&  f) &&
inline

Definition at line 1416 of file cast.h.

References argument_loader< Args >::call_impl().

◆ call_impl() [1/2]

template<typename... Args>
template<typename Return , typename Func , size_t... Is, typename Guard >
Return argument_loader< Args >::call_impl ( Func &&  f,
index_sequence< Is... >  ,
Guard &&   
) &&
inlineprivate

Definition at line 1440 of file cast.h.

References argument_loader< Args >::argcasters.

Referenced by argument_loader< Args >::call().

◆ call_impl() [2/2]

template<typename... Args>
template<typename Return , typename Func , size_t... Is, typename Guard >
Return argument_loader< Args >::call_impl ( Func &&  f,
index_sequence< Is... >  ,
Guard &&   
) &&
inlineprivate

Definition at line 1442 of file cast.h.

References argument_loader< Args >::argcasters.

◆ load_args() [1/2]

template<typename... Args>
bool argument_loader< Args >::load_args ( function_call call)
inline

◆ load_args() [2/2]

template<typename... Args>
bool argument_loader< Args >::load_args ( function_call call)
inline

◆ load_impl_sequence() [1/4]

template<typename... Args>
static bool argument_loader< Args >::load_impl_sequence ( function_call ,
index_sequence<>   
)
inlinestaticprivate

Definition at line 1421 of file cast.h.

Referenced by argument_loader< Args >::load_args().

◆ load_impl_sequence() [2/4]

template<typename... Args>
static bool argument_loader< Args >::load_impl_sequence ( function_call ,
index_sequence<>   
)
inlinestaticprivate

Definition at line 1423 of file cast.h.

◆ load_impl_sequence() [3/4]

template<typename... Args>
template<size_t... Is>
bool argument_loader< Args >::load_impl_sequence ( function_call call,
index_sequence< Is... >   
)
inlineprivate

◆ load_impl_sequence() [4/4]

template<typename... Args>
template<size_t... Is>
bool argument_loader< Args >::load_impl_sequence ( function_call call,
index_sequence< Is... >   
)
inlineprivate

Member Data Documentation

◆ arg_names

template<typename... Args>
static constexpr auto argument_loader< Args >::arg_names = concat(type_descr(make_caster<Args>::name)...)
staticconstexpr

Definition at line 1402 of file cast.h.

◆ argcasters

template<typename... Args>
std::tuple< make_caster< Args >... > argument_loader< Args >::argcasters
private

◆ args_pos

template<typename... Args>
static constexpr int argument_loader< Args >::args_pos = constexpr_last<argument_is_args, Args...>()
staticconstexpr

Definition at line 1397 of file cast.h.

◆ has_kwargs

template<typename... Args>
static constexpr bool argument_loader< Args >::has_kwargs = kwargs_pos != -1
staticconstexpr

Definition at line 1394 of file cast.h.

◆ kwargs_pos

template<typename... Args>
static constexpr auto argument_loader< Args >::kwargs_pos = constexpr_last<argument_is_kwargs, Args...>()
staticconstexprprivate

Definition at line 1388 of file cast.h.


The documentation for this class was generated from the following files: