Scarab  v2.9.0
Project 8 C++ Utility Library
Public Member Functions | Private Attributes | 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...
 

Private Attributes

tuple m_args
 

Detailed Description

template<return_value_policy policy>
class pybind11::detail::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 1942 of file cast.h.

Constructor & Destructor Documentation

◆ simple_collector()

simple_collector ( Ts &&...  values)
inlineexplicit

Definition at line 1945 of file cast.h.

Member Function Documentation

◆ args() [1/2]

const tuple& args ( ) const &
inline

Definition at line 1948 of file cast.h.

◆ args() [2/2]

tuple args ( ) &&
inline

Definition at line 1951 of file cast.h.

◆ call()

object call ( PyObject *  ptr) const
inline

Call a Python function and pass the collected arguments.

Definition at line 1954 of file cast.h.

◆ kwargs()

dict kwargs ( ) const
inline

Definition at line 1949 of file cast.h.

Member Data Documentation

◆ m_args

tuple m_args
private

Definition at line 1962 of file cast.h.


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