Public Member Functions | Private Attributes | List of all members
simple_collector< policy > Class Template Reference

#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...
 
dict kwargs () const
 
template<typename... Ts>
 simple_collector (Ts &&...values)
 

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()

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

Definition at line 1453 of file cast.h.

Member Function Documentation

◆ args() [1/2]

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

Definition at line 1456 of file cast.h.

◆ args() [2/2]

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

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

◆ kwargs()

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

Definition at line 1457 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.


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


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