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

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

Private Member Functions

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

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

Member Function Documentation

◆ args() [1/2]

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

Definition at line 1675 of file cast.h.

◆ args() [2/2]

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

Definition at line 1672 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 1679 of file cast.h.

◆ kwargs() [1/2]

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

Definition at line 1676 of file cast.h.

◆ kwargs() [2/2]

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

Definition at line 1673 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 1761 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 1767 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 1750 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 1756 of file cast.h.

◆ process() [1/4]

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

Definition at line 1709 of file cast.h.

◆ process() [2/4]

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

Definition at line 1734 of file cast.h.

◆ process() [3/4]

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

Definition at line 1703 of file cast.h.

◆ process() [4/4]

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

Definition at line 1689 of file cast.h.

Member Data Documentation

◆ m_args

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

Definition at line 1772 of file cast.h.

◆ m_kwargs

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

Definition at line 1773 of file cast.h.


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


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:43:49