Scarab  v2.11.1
Project 8 C++ Utility Library
Public Types | Public Member Functions | Private Types | Friends | List of all members
generic_iterator< Policy > Class Template Reference

STL iterator template used for tuple, list, sequence and dict. More...

#include <pytypes.h>

Inheritance diagram for generic_iterator< Policy >:
Inheritance graph

Public Types

using difference_type = ssize_t
 
using iterator_category = typename Policy::iterator_category
 
using value_type = typename Policy::value_type
 
using reference = typename Policy::reference
 
using pointer = typename Policy::pointer
 

Public Member Functions

 generic_iterator ()=default
 
 generic_iterator (handle seq, ssize_t index)
 
reference operator* () const
 
reference operator[] (difference_type n) const
 
pointer operator-> () const
 
Itoperator++ ()
 
It operator++ (int)
 
Itoperator-- ()
 
It operator-- (int)
 
Itoperator+= (difference_type n)
 
Itoperator-= (difference_type n)
 

Private Types

using It = generic_iterator
 

Friends

It operator+ (const It &a, difference_type n)
 
It operator+ (difference_type n, const It &b)
 
It operator- (const It &a, difference_type n)
 
difference_type operator- (const It &a, const It &b)
 
bool operator== (const It &a, const It &b)
 
bool operator!= (const It &a, const It &b)
 
bool operator< (const It &a, const It &b)
 
bool operator> (const It &a, const It &b)
 
bool operator>= (const It &a, const It &b)
 
bool operator<= (const It &a, const It &b)
 

Detailed Description

template<typename Policy>
class pybind11::detail::generic_iterator< Policy >

STL iterator template used for tuple, list, sequence and dict.

Definition at line 604 of file pytypes.h.

Member Typedef Documentation

◆ difference_type

Definition at line 608 of file pytypes.h.

◆ It

using It = generic_iterator
private

Definition at line 605 of file pytypes.h.

◆ iterator_category

using iterator_category = typename Policy::iterator_category

Definition at line 609 of file pytypes.h.

◆ pointer

using pointer = typename Policy::pointer

Definition at line 612 of file pytypes.h.

◆ reference

using reference = typename Policy::reference

Definition at line 611 of file pytypes.h.

◆ value_type

using value_type = typename Policy::value_type

Definition at line 610 of file pytypes.h.

Constructor & Destructor Documentation

◆ generic_iterator() [1/2]

generic_iterator ( )
default

◆ generic_iterator() [2/2]

generic_iterator ( handle  seq,
ssize_t  index 
)
inline

Definition at line 615 of file pytypes.h.

Member Function Documentation

◆ operator*()

reference operator* ( ) const
inline

Definition at line 617 of file pytypes.h.

◆ operator++() [1/2]

It& operator++ ( )
inline

Definition at line 621 of file pytypes.h.

◆ operator++() [2/2]

It operator++ ( int  )
inline

Definition at line 622 of file pytypes.h.

◆ operator+=()

It& operator+= ( difference_type  n)
inline

Definition at line 625 of file pytypes.h.

◆ operator--() [1/2]

It& operator-- ( )
inline

Definition at line 623 of file pytypes.h.

◆ operator--() [2/2]

It operator-- ( int  )
inline

Definition at line 624 of file pytypes.h.

◆ operator-=()

It& operator-= ( difference_type  n)
inline

Definition at line 626 of file pytypes.h.

◆ operator->()

pointer operator-> ( ) const
inline

Definition at line 619 of file pytypes.h.

◆ operator[]()

reference operator[] ( difference_type  n) const
inline

Definition at line 618 of file pytypes.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const It a,
const It b 
)
friend

Definition at line 634 of file pytypes.h.

◆ operator+ [1/2]

It operator+ ( const It a,
difference_type  n 
)
friend

Definition at line 628 of file pytypes.h.

◆ operator+ [2/2]

It operator+ ( difference_type  n,
const It b 
)
friend

Definition at line 629 of file pytypes.h.

◆ operator- [1/2]

It operator- ( const It a,
difference_type  n 
)
friend

Definition at line 630 of file pytypes.h.

◆ operator- [2/2]

difference_type operator- ( const It a,
const It b 
)
friend

Definition at line 631 of file pytypes.h.

◆ operator<

bool operator< ( const It a,
const It b 
)
friend

Definition at line 635 of file pytypes.h.

◆ operator<=

bool operator<= ( const It a,
const It b 
)
friend

Definition at line 638 of file pytypes.h.

◆ operator==

bool operator== ( const It a,
const It b 
)
friend

Definition at line 633 of file pytypes.h.

◆ operator>

bool operator> ( const It a,
const It b 
)
friend

Definition at line 636 of file pytypes.h.

◆ operator>=

bool operator>= ( const It a,
const It b 
)
friend

Definition at line 637 of file pytypes.h.


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