cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Public Member Functions | Static Public Attributes | List of all members
argument_loader< Args > Class Template Reference

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

#include <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) &&
 

Static Public Attributes

static constexpr bool has_kwargs = kwargs_pos < 0
 
static constexpr bool has_args = args_pos < 0
 
static constexpr auto arg_names = concat(type_descr(make_caster<Args>::name)...)
 

Detailed Description

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

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

Definition at line 2015 of file cast.h.

Member Function Documentation

◆ call() [1/2]

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 2039 of file cast.h.

◆ call() [2/2]

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 2044 of file cast.h.

◆ load_args()

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

Definition at line 2034 of file cast.h.

Member Data Documentation

◆ arg_names

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

Definition at line 2032 of file cast.h.

◆ has_args

template<typename... Args>
constexpr bool argument_loader< Args >::has_args = args_pos < 0
staticconstexpr

Definition at line 2030 of file cast.h.

◆ has_kwargs

template<typename... Args>
constexpr bool argument_loader< Args >::has_kwargs = kwargs_pos < 0
staticconstexpr

Definition at line 2029 of file cast.h.


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