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 multiple_values_error ()
 
static void multiple_values_error (const std::string &name)
 
static void nameless_argument_error ()
 
static void nameless_argument_error (const 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 1476 of file cast.h.

Constructor & Destructor Documentation

◆ unpacking_collector()

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

Definition at line 1479 of file cast.h.

Member Function Documentation

◆ args() [1/2]

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

Definition at line 1489 of file cast.h.

◆ args() [2/2]

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

Definition at line 1492 of file cast.h.

◆ call()

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

◆ kwargs() [1/2]

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

Definition at line 1490 of file cast.h.

◆ kwargs() [2/2]

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

Definition at line 1493 of file cast.h.

◆ multiple_values_error() [1/2]

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

Definition at line 1578 of file cast.h.

◆ multiple_values_error() [2/2]

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

Definition at line 1584 of file cast.h.

◆ nameless_argument_error() [1/2]

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

Definition at line 1567 of file cast.h.

◆ nameless_argument_error() [2/2]

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

Definition at line 1573 of file cast.h.

◆ process() [1/4]

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

Definition at line 1506 of file cast.h.

◆ process() [2/4]

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

Definition at line 1520 of file cast.h.

◆ process() [3/4]

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

Definition at line 1526 of file cast.h.

◆ process() [4/4]

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

Definition at line 1551 of file cast.h.

Member Data Documentation

◆ m_args

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

Definition at line 1589 of file cast.h.

◆ m_kwargs

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

Definition at line 1590 of file cast.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:10