cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Public Member Functions | List of all members
simple_collector< policy > Class Template Reference

#include <cast.h>

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...
 

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

Constructor & Destructor Documentation

◆ simple_collector()

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

Definition at line 2080 of file cast.h.

Member Function Documentation

◆ args() [1/2]

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

Definition at line 2086 of file cast.h.

◆ args() [2/2]

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

Definition at line 2083 of file cast.h.

◆ call()

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

◆ kwargs()

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

Definition at line 2084 of file cast.h.


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