Rcpp Version 1.0.9
Rcpp::sugar::SugarIterator< T > Class Template Reference

#include <iterator.h>

Public Types

typedef R_xlen_t difference_type
 
typedef Rcpp::traits::storage_type< Rcpp::traits::r_sexptype_traits< T >::rtype >::type STORAGE_TYPE
 
typedef STORAGE_TYPE reference
 
typedef STORAGE_TYPEpointer
 
typedef std::random_access_iterator_tag iterator_category
 
typedef SugarIterator iterator
 

Public Member Functions

 SugarIterator (const T &ref_)
 
 SugarIterator (const T &ref_, R_xlen_t index_)
 
 SugarIterator (const SugarIterator &other)
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
iteratoroperator-- ()
 
iterator operator-- (int)
 
iterator operator+ (difference_type n) const
 
iterator operator- (difference_type n) const
 
iteratoroperator+= (difference_type n)
 
iteratoroperator-= (difference_type n)
 
reference operator[] (R_xlen_t i)
 
reference operator* ()
 
pointer operator-> ()
 
bool operator== (const iterator &y) const
 
bool operator!= (const iterator &y) const
 
bool operator< (const iterator &other) const
 
bool operator> (const iterator &other) const
 
bool operator<= (const iterator &other) const
 
bool operator>= (const iterator &other) const
 
difference_type operator- (const iterator &other) const
 

Private Attributes

const T & ref
 
R_xlen_t index
 

Detailed Description

template<typename T>
class Rcpp::sugar::SugarIterator< T >

Definition at line 30 of file iterator.h.

Member Typedef Documentation

◆ difference_type

template<typename T >
typedef R_xlen_t Rcpp::sugar::SugarIterator< T >::difference_type

Definition at line 33 of file iterator.h.

◆ iterator

template<typename T >
typedef SugarIterator Rcpp::sugar::SugarIterator< T >::iterator

Definition at line 38 of file iterator.h.

◆ iterator_category

template<typename T >
typedef std::random_access_iterator_tag Rcpp::sugar::SugarIterator< T >::iterator_category

Definition at line 37 of file iterator.h.

◆ pointer

template<typename T >
typedef STORAGE_TYPE* Rcpp::sugar::SugarIterator< T >::pointer

Definition at line 36 of file iterator.h.

◆ reference

template<typename T >
typedef STORAGE_TYPE Rcpp::sugar::SugarIterator< T >::reference

Definition at line 35 of file iterator.h.

◆ STORAGE_TYPE

Definition at line 34 of file iterator.h.

Constructor & Destructor Documentation

◆ SugarIterator() [1/3]

template<typename T >
Rcpp::sugar::SugarIterator< T >::SugarIterator ( const T &  ref_)
inline

Definition at line 40 of file iterator.h.

◆ SugarIterator() [2/3]

template<typename T >
Rcpp::sugar::SugarIterator< T >::SugarIterator ( const T &  ref_,
R_xlen_t  index_ 
)
inline

Definition at line 41 of file iterator.h.

◆ SugarIterator() [3/3]

template<typename T >
Rcpp::sugar::SugarIterator< T >::SugarIterator ( const SugarIterator< T > &  other)
inline

Definition at line 42 of file iterator.h.

Member Function Documentation

◆ operator!=()

template<typename T >
bool Rcpp::sugar::SugarIterator< T >::operator!= ( const iterator y) const
inline

Definition at line 84 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator*()

template<typename T >
reference Rcpp::sugar::SugarIterator< T >::operator* ( )
inline

◆ operator+()

template<typename T >
iterator Rcpp::sugar::SugarIterator< T >::operator+ ( difference_type  n) const
inline

◆ operator++() [1/2]

template<typename T >
iterator& Rcpp::sugar::SugarIterator< T >::operator++ ( )
inline

Definition at line 44 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator++() [2/2]

template<typename T >
iterator Rcpp::sugar::SugarIterator< T >::operator++ ( int  )
inline

Definition at line 45 of file iterator.h.

◆ operator+=()

template<typename T >
iterator& Rcpp::sugar::SugarIterator< T >::operator+= ( difference_type  n)
inline

Definition at line 62 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator-() [1/2]

template<typename T >
difference_type Rcpp::sugar::SugarIterator< T >::operator- ( const iterator other) const
inline

Definition at line 100 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator-() [2/2]

template<typename T >
iterator Rcpp::sugar::SugarIterator< T >::operator- ( difference_type  n) const
inline

◆ operator--() [1/2]

template<typename T >
iterator& Rcpp::sugar::SugarIterator< T >::operator-- ( )
inline

Definition at line 50 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator--() [2/2]

template<typename T >
iterator Rcpp::sugar::SugarIterator< T >::operator-- ( int  )
inline

Definition at line 51 of file iterator.h.

◆ operator-=()

template<typename T >
iterator& Rcpp::sugar::SugarIterator< T >::operator-= ( difference_type  n)
inline

Definition at line 66 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator->()

template<typename T >
pointer Rcpp::sugar::SugarIterator< T >::operator-> ( )
inline

◆ operator<()

template<typename T >
bool Rcpp::sugar::SugarIterator< T >::operator< ( const iterator other) const
inline

Definition at line 87 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator<=()

template<typename T >
bool Rcpp::sugar::SugarIterator< T >::operator<= ( const iterator other) const
inline

Definition at line 93 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator==()

template<typename T >
bool Rcpp::sugar::SugarIterator< T >::operator== ( const iterator y) const
inline

Definition at line 81 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator>()

template<typename T >
bool Rcpp::sugar::SugarIterator< T >::operator> ( const iterator other) const
inline

Definition at line 90 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator>=()

template<typename T >
bool Rcpp::sugar::SugarIterator< T >::operator>= ( const iterator other) const
inline

Definition at line 96 of file iterator.h.

References Rcpp::sugar::SugarIterator< T >::index.

◆ operator[]()

template<typename T >
reference Rcpp::sugar::SugarIterator< T >::operator[] ( R_xlen_t  i)
inline

Member Data Documentation

◆ index

◆ ref


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