resonance 1.0.1
Loading...
Searching...
No Matches
Py::SeqBase< T >::iterator Class Reference

Position within a sequence, as PyCXX's SeqBase<T>::iterator is laid out. More...

#include <seqbase.h>

Public Member Functions

 iterator (SeqBase< T > *pSequence, int nWhere)
 Address one position.
bool operator== (const iterator &other) const
 Report whether two iterators address the same position of the same sequence.
bool operator!= (const iterator &other) const
 Report whether two iterators address different positions.
seqref< T > operator* ()
 Address the element at this position.
iterator & operator++ ()
 Step to the next position.

Detailed Description

template<typename T>
class Py::SeqBase< T >::iterator

Position within a sequence, as PyCXX's SeqBase<T>::iterator is laid out.

The object is the pair of the sequence's address and an index. PlayMapLinear::LoadStepRings() at 0x00128410 expands every member it uses. Equality compares the two sequence addresses and the two indices, not the Python objects, and end() reads PySequence_Length() afresh each time the loop tests against it. Dereferencing builds a seqref<T>, which fetches the element through getItem(), the virtual at +0x38.

Constructor & Destructor Documentation

◆ iterator()

template<typename T>
Py::SeqBase< T >::iterator::iterator ( SeqBase< T > * pSequence,
int nWhere )
inline

Address one position.

Parameters
pSequenceThe sequence.
nWhereThe index.

Member Function Documentation

◆ operator==()

template<typename T>
bool Py::SeqBase< T >::iterator::operator== ( const iterator & other) const
inline

Report whether two iterators address the same position of the same sequence.

Parameters
otherThe iterator to compare with.
Returns
True when both the sequence and the index match.

◆ operator!=()

template<typename T>
bool Py::SeqBase< T >::iterator::operator!= ( const iterator & other) const
inline

Report whether two iterators address different positions.

Parameters
otherThe iterator to compare with.
Returns
True when the sequence or the index differs.

◆ operator*()

template<typename T>
seqref< T > Py::SeqBase< T >::iterator::operator* ( )
inline

Address the element at this position.

Returns
A proxy for the element.

◆ operator++()

template<typename T>
iterator & Py::SeqBase< T >::iterator::operator++ ( )
inline

Step to the next position.

Returns
This iterator.

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