resonance 1.0.1
Loading...
Searching...
No Matches
Py::seqref< T > Class Template Reference

Proxy for one element of a sequence, which SeqBase::operator[]() returns. More...

#include <seqref.h>

Public Member Functions

 seqref (SeqBase< T > &sequence, int nOffset)
 Address one element and fetch it.
seqref & operator= (const Object &value)
 Store an element through the proxy.
 operator T () const
 Copy the fetched element out.
bool isTuple () const
 Report whether the fetched element is a tuple.

Detailed Description

template<typename T>
class Py::seqref< T >

Proxy for one element of a sequence, which SeqBase::operator[]() returns.

The class is inline throughout and emits no RTTI descriptor. The stack frame of MetNullRenderer::OnRawController() at 0x0030e4c0 lays it out as the sequence reference, the index, and a copy of the element, which the constructor fetches through SeqBase::getItem(). The name is released PyCXX's.

Constructor & Destructor Documentation

◆ seqref()

template<typename T>
Py::seqref< T >::seqref ( SeqBase< T > & sequence,
int nOffset )
inline

Address one element and fetch it.

Parameters
sequenceThe sequence.
nOffsetThe index.

Member Function Documentation

◆ operator=()

template<typename T>
seqref & Py::seqref< T >::operator= ( const Object & value)
inline

Store an element through the proxy.

The proxy's copy takes the value through Py::Object's assignment before the sequence stores it, as PythonExtension::getattr_methods() at 0x005ad5e0 expands it.

Parameters
valueThe element to store.
Returns
This proxy.

◆ operator T()

template<typename T>
Py::seqref< T >::operator T ( ) const
inline

Copy the fetched element out.

Returns
A handle on the element.

◆ isTuple()

template<typename T>
bool Py::seqref< T >::isTuple ( ) const
inline

Report whether the fetched element is a tuple.

Returns
True for a tuple.

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