HepMC3 event record library
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
unpacking_collector< policy > Class Template Reference

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

#include <cast.h>

+ Collaboration diagram for unpacking_collector< policy >:

Public Member Functions

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

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 nameless_argument_error ()
 
static void nameless_argument_error (std::string type)
 
static void multiple_values_error ()
 
static void multiple_values_error (std::string name)
 
static void argument_cast_error ()
 
static void argument_cast_error (std::string name, 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 2044 of file cast.h.

Member Function Documentation

◆ call()

object call ( PyObject *  ptr) const
inline

Call a Python function and pass the collected arguments.

Definition at line 2064 of file cast.h.

References handle::ptr().


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