Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
unpacking_collector< policy > Class Template Reference

Helper class which collects positional, keyword, * and ** arguments for a Python function call. More...

#include <cast.h>

Public Member Functions

const tupleargs () const &
 
tuple args ()&&
 
object call (PyObject *ptr) const
 Call a Python function and pass the collected arguments. More...
 
const dictkwargs () const &
 
dict kwargs ()&&
 
template<typename... Ts>
 unpacking_collector (Ts &&...values)
 

Private Member Functions

template<typename T >
void process (list &args_list, T &&x)
 
void process (list &args_list, detail::args_proxy ap)
 
void process (list &, arg_v a)
 
void process (list &, detail::kwargs_proxy kp)
 

Static Private Member Functions

static void argument_cast_error ()
 
static void argument_cast_error (std::string name, std::string type)
 
static void multiple_values_error ()
 
static void multiple_values_error (std::string name)
 
static void nameless_argument_error ()
 
static void nameless_argument_error (std::string type)
 

Private Attributes

tuple m_args
 
dict m_kwargs
 

Detailed Description

template<return_value_policy policy>
class unpacking_collector< policy >

Helper class which collects positional, keyword, * and ** arguments for a Python function call.

Definition at line 2053 of file cast.h.

Constructor & Destructor Documentation

template<return_value_policy policy>
template<typename... Ts>
unpacking_collector< policy >::unpacking_collector ( Ts &&...  values)
inlineexplicit

Definition at line 2056 of file cast.h.

Member Function Documentation

template<return_value_policy policy>
const tuple& unpacking_collector< policy >::args ( ) const
inline

Definition at line 2066 of file cast.h.

template<return_value_policy policy>
tuple unpacking_collector< policy >::args ( )
inline

Definition at line 2069 of file cast.h.

template<return_value_policy policy>
static void unpacking_collector< policy >::argument_cast_error ( )
inlinestaticprivate

Definition at line 2157 of file cast.h.

template<return_value_policy policy>
static void unpacking_collector< policy >::argument_cast_error ( std::string  name,
std::string  type 
)
inlinestaticprivate

Definition at line 2162 of file cast.h.

template<return_value_policy policy>
object unpacking_collector< policy >::call ( PyObject *  ptr) const
inline

Call a Python function and pass the collected arguments.

Definition at line 2073 of file cast.h.

template<return_value_policy policy>
const dict& unpacking_collector< policy >::kwargs ( ) const
inline

Definition at line 2067 of file cast.h.

template<return_value_policy policy>
dict unpacking_collector< policy >::kwargs ( )
inline

Definition at line 2070 of file cast.h.

template<return_value_policy policy>
static void unpacking_collector< policy >::multiple_values_error ( )
inlinestaticprivate

Definition at line 2148 of file cast.h.

template<return_value_policy policy>
static void unpacking_collector< policy >::multiple_values_error ( std::string  name)
inlinestaticprivate

Definition at line 2153 of file cast.h.

template<return_value_policy policy>
static void unpacking_collector< policy >::nameless_argument_error ( )
inlinestaticprivate

Definition at line 2139 of file cast.h.

template<return_value_policy policy>
static void unpacking_collector< policy >::nameless_argument_error ( std::string  type)
inlinestaticprivate

Definition at line 2144 of file cast.h.

template<return_value_policy policy>
template<typename T >
void unpacking_collector< policy >::process ( list args_list,
T &&  x 
)
inlineprivate

Definition at line 2082 of file cast.h.

template<return_value_policy policy>
void unpacking_collector< policy >::process ( list args_list,
detail::args_proxy  ap 
)
inlineprivate

Definition at line 2094 of file cast.h.

template<return_value_policy policy>
void unpacking_collector< policy >::process ( list ,
arg_v  a 
)
inlineprivate

Definition at line 2099 of file cast.h.

template<return_value_policy policy>
void unpacking_collector< policy >::process ( list ,
detail::kwargs_proxy  kp 
)
inlineprivate

Definition at line 2124 of file cast.h.

Member Data Documentation

template<return_value_policy policy>
tuple unpacking_collector< policy >::m_args
private

Definition at line 2168 of file cast.h.

template<return_value_policy policy>
dict unpacking_collector< policy >::m_kwargs
private

Definition at line 2169 of file cast.h.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:58