μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
simple_collector< policy > Class Template Reference

Helper class which collects only positional arguments for a Python function call. More...

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/cast.h>

Collaboration diagram for simple_collector< policy >:
[legend]

Public Member Functions

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

Private Attributes

tuple m_args
 

Detailed Description

template<return_value_policy policy>
class simple_collector< policy >

Helper class which collects only positional arguments for a Python function call.

A fancier version below can collect any argument, but this one is optimal for simple calls.

Definition at line 1450 of file cast.h.

Constructor & Destructor Documentation

◆ simple_collector() [1/2]

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

Definition at line 1453 of file cast.h.

◆ simple_collector() [2/2]

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

Definition at line 1455 of file cast.h.

Member Function Documentation

◆ args() [1/4]

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

Definition at line 1459 of file cast.h.

References simple_collector< policy >::m_args.

◆ args() [2/4]

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

Definition at line 1461 of file cast.h.

References simple_collector< policy >::m_args.

◆ args() [3/4]

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

Definition at line 1456 of file cast.h.

References simple_collector< policy >::m_args.

◆ args() [4/4]

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

Definition at line 1458 of file cast.h.

References simple_collector< policy >::m_args.

◆ call() [1/2]

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

Call a Python function and pass the collected arguments.

Definition at line 1462 of file cast.h.

References simple_collector< policy >::m_args, and handle::ptr().

◆ call() [2/2]

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

Call a Python function and pass the collected arguments.

Definition at line 1464 of file cast.h.

References simple_collector< policy >::m_args, and handle::ptr().

◆ kwargs() [1/2]

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

Definition at line 1457 of file cast.h.

◆ kwargs() [2/2]

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

Definition at line 1459 of file cast.h.

Member Data Documentation

◆ m_args

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

Definition at line 1471 of file cast.h.

Referenced by simple_collector< policy >::args(), and simple_collector< policy >::call().


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