ReactOS 0.4.15-dev-7931-gfd331f1
_Rope_const_iterator< _CharT, _Alloc > Class Template Reference

#include <_rope.h>

Inheritance diagram for _Rope_const_iterator< _CharT, _Alloc >:
Collaboration diagram for _Rope_const_iterator< _CharT, _Alloc >:

Public Types

typedef _Rope_RopeRep< _CharT, _Alloc_RopeRep
 
typedef _CharT reference
 
typedef const _CharT * pointer
 
typedef _CharT value_type
 
typedef ptrdiff_t difference_type
 
typedef random_access_iterator_tag iterator_category
 
- Public Types inherited from _Rope_iterator_base< _CharT, _Alloc >
enum  { _S_path_cache_len = 4 }
 
enum  { _S_iterator_buf_len = 15 }
 
typedef _Rope_RopeRep< _CharT, _Alloc_RopeRep
 

Public Member Functions

 _Rope_const_iterator (const _RopeRep *__root, size_t __pos)
 
 _Rope_const_iterator ()
 
 _Rope_const_iterator (const _Self &__x)
 
 _Rope_const_iterator (const _Rope_iterator< _CharT, _Alloc > &__x)
 
 _Rope_const_iterator (const rope< _CharT, _Alloc > &__r, size_t __pos)
 
_Selfoperator= (const _Self &__x)
 
reference operator* ()
 
_Selfoperator++ ()
 
_Selfoperator+= (ptrdiff_t __n)
 
_Selfoperator-- ()
 
_Selfoperator-= (ptrdiff_t __n)
 
_Self operator++ (int)
 
_Self operator-- (int)
 
reference operator[] (size_t __n)
 
- Public Member Functions inherited from _Rope_iterator_base< _CharT, _Alloc >
 _Rope_iterator_base ()
 
 _Rope_iterator_base (_RopeRep *__root, size_t __pos)
 
void _M_incr (size_t __n)
 
void _M_decr (size_t __n)
 
size_t index () const
 
 _Rope_iterator_base (const _Self &__x)
 
_Selfoperator= (const _Self &__x)
 

Private Types

typedef _Rope_const_iterator< _CharT, _Alloc_Self
 
typedef _Rope_iterator_base< _CharT, _Alloc_Base
 

Friends

class rope< _CharT, _Alloc >
 

Additional Inherited Members

- Static Public Member Functions inherited from _Rope_iterator_base< _CharT, _Alloc >
static void _S_setbuf (_Rope_iterator_base< _CharT, _Alloc > &__x)
 
static void _S_setcache (_Rope_iterator_base< _CharT, _Alloc > &__x)
 
static void _S_setcache_for_incr (_Rope_iterator_base< _CharT, _Alloc > &__x)
 
- Public Attributes inherited from _Rope_iterator_base< _CharT, _Alloc >
size_t _M_current_pos
 
_RopeRep_M_root
 
size_t _M_leaf_pos
 
_CharT * _M_buf_start
 
_CharT * _M_buf_ptr
 
_CharT * _M_buf_end
 
struct {
   _RopeRep const *   _M_data [_S_path_cache_len]
 
_M_path_end
 
int _M_leaf_index
 
unsigned char _M_path_directions
 
struct {
   _CharT   _M_data [_S_iterator_buf_len]
 
_M_tmp_buf
 

Detailed Description

template<class _CharT, class _Alloc>
class _Rope_const_iterator< _CharT, _Alloc >

Definition at line 871 of file _rope.h.

Member Typedef Documentation

◆ _Base

template<class _CharT , class _Alloc >
typedef _Rope_iterator_base<_CharT,_Alloc> _Rope_const_iterator< _CharT, _Alloc >::_Base
private

Definition at line 874 of file _rope.h.

◆ _RopeRep

template<class _CharT , class _Alloc >
typedef _Rope_RopeRep<_CharT,_Alloc> _Rope_const_iterator< _CharT, _Alloc >::_RopeRep

Definition at line 878 of file _rope.h.

◆ _Self

template<class _CharT , class _Alloc >
typedef _Rope_const_iterator<_CharT, _Alloc> _Rope_const_iterator< _CharT, _Alloc >::_Self
private

Definition at line 873 of file _rope.h.

◆ difference_type

template<class _CharT , class _Alloc >
typedef ptrdiff_t _Rope_const_iterator< _CharT, _Alloc >::difference_type

Definition at line 891 of file _rope.h.

◆ iterator_category

template<class _CharT , class _Alloc >
typedef random_access_iterator_tag _Rope_const_iterator< _CharT, _Alloc >::iterator_category

Definition at line 892 of file _rope.h.

◆ pointer

template<class _CharT , class _Alloc >
typedef const _CharT* _Rope_const_iterator< _CharT, _Alloc >::pointer

Definition at line 889 of file _rope.h.

◆ reference

template<class _CharT , class _Alloc >
typedef _CharT _Rope_const_iterator< _CharT, _Alloc >::reference

Definition at line 886 of file _rope.h.

◆ value_type

template<class _CharT , class _Alloc >
typedef _CharT _Rope_const_iterator< _CharT, _Alloc >::value_type

Definition at line 890 of file _rope.h.

Constructor & Destructor Documentation

◆ _Rope_const_iterator() [1/5]

template<class _CharT , class _Alloc >
_Rope_const_iterator< _CharT, _Alloc >::_Rope_const_iterator ( const _RopeRep __root,
size_t  __pos 
)
inline

Definition at line 881 of file _rope.h.

881 :
883 // Only nonconst iterators modify root ref count
884 {}
_Rope_RopeRep< _CharT, _Alloc > _RopeRep
Definition: _rope.h:878
#define __CONST_CAST(__x, __y)
Definition: features.h:584

◆ _Rope_const_iterator() [2/5]

template<class _CharT , class _Alloc >
_Rope_const_iterator< _CharT, _Alloc >::_Rope_const_iterator ( )
inline

Definition at line 895 of file _rope.h.

895{}

◆ _Rope_const_iterator() [3/5]

template<class _CharT , class _Alloc >
_Rope_const_iterator< _CharT, _Alloc >::_Rope_const_iterator ( const _Self __x)
inline

Definition at line 896 of file _rope.h.

◆ _Rope_const_iterator() [4/5]

template<class _CharT , class _Alloc >
_Rope_const_iterator< _CharT, _Alloc >::_Rope_const_iterator ( const _Rope_iterator< _CharT, _Alloc > &  __x)
inline

Definition at line 898 of file _rope.h.

◆ _Rope_const_iterator() [5/5]

template<class _CharT , class _Alloc >
_Rope_const_iterator< _CharT, _Alloc >::_Rope_const_iterator ( const rope< _CharT, _Alloc > &  __r,
size_t  __pos 
)
inline

Definition at line 900 of file _rope.h.

900 :
_STLP_PRIV _STLP_alloc_proxy< _RopeRep *, _CharT, allocator_type > _M_tree_ptr
Definition: _rope.h:1128

Member Function Documentation

◆ operator*()

template<class _CharT , class _Alloc >
reference _Rope_const_iterator< _CharT, _Alloc >::operator* ( )
inline

Definition at line 906 of file _rope.h.

906 {
907 if (0 == this->_M_buf_ptr)
908#if !defined (__DMC__)
909 _S_setcache(*this);
910#else
912#endif
913 return *(this->_M_buf_ptr);
914 }
static void _S_setcache(_Rope_iterator_base< _CharT, _Alloc > &__x)
Definition: _rope.c:136
_CharT * _M_buf_ptr
Definition: _rope.h:772

◆ operator++() [1/2]

template<class _CharT , class _Alloc >
_Self & _Rope_const_iterator< _CharT, _Alloc >::operator++ ( )
inline

Definition at line 915 of file _rope.h.

916 {
917 if ( this->_M_buf_ptr != 0 ) {
918 _CharT *__next = this->_M_buf_ptr + 1;
919 if ( __next < this->_M_buf_end ) {
920 this->_M_buf_ptr = __next;
921 ++this->_M_current_pos;
922 return *this;
923 }
924 }
925 this->_M_incr(1);
926 return *this;
927 }
_CharT * _M_buf_end
Definition: _rope.h:774
void _M_incr(size_t __n)
Definition: _rope.c:270
size_t _M_current_pos
Definition: _rope.h:764

◆ operator++() [2/2]

template<class _CharT , class _Alloc >
_Self _Rope_const_iterator< _CharT, _Alloc >::operator++ ( int  )
inline

Definition at line 948 of file _rope.h.

948 {
949 size_t __old_pos = this->_M_current_pos;
950 this->_M_incr(1);
951 return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
952 // This makes a subsequent dereference expensive.
953 // Perhaps we should instead copy the iterator
954 // if it has a valid cache?
955 }
_RopeRep * _M_root
Definition: _rope.h:766

◆ operator+=()

template<class _CharT , class _Alloc >
_Self & _Rope_const_iterator< _CharT, _Alloc >::operator+= ( ptrdiff_t  __n)
inline

Definition at line 928 of file _rope.h.

928 {
929 if (__n >= 0) {
930 this->_M_incr(__n);
931 } else {
932 this->_M_decr(-__n);
933 }
934 return *this;
935 }
return __n
Definition: _algo.h:75
void _M_decr(size_t __n)
Definition: _rope.c:286

◆ operator--() [1/2]

template<class _CharT , class _Alloc >
_Self & _Rope_const_iterator< _CharT, _Alloc >::operator-- ( )
inline

Definition at line 936 of file _rope.h.

936 {
937 this->_M_decr(1);
938 return *this;
939 }

◆ operator--() [2/2]

template<class _CharT , class _Alloc >
_Self _Rope_const_iterator< _CharT, _Alloc >::operator-- ( int  )
inline

Definition at line 956 of file _rope.h.

956 {
957 size_t __old_pos = this->_M_current_pos;
958 this->_M_decr(1);
959 return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
960 }

◆ operator-=()

template<class _CharT , class _Alloc >
_Self & _Rope_const_iterator< _CharT, _Alloc >::operator-= ( ptrdiff_t  __n)
inline

Definition at line 940 of file _rope.h.

940 {
941 if (__n >= 0) {
942 this->_M_decr(__n);
943 } else {
944 this->_M_incr(-__n);
945 }
946 return *this;
947 }

◆ operator=()

template<class _CharT , class _Alloc >
_Self & _Rope_const_iterator< _CharT, _Alloc >::operator= ( const _Self __x)
inline

Definition at line 902 of file _rope.h.

902 {
903 _Base::operator=(__x);
904 return *this;
905 }
_Self & operator=(const _Self &__x)
Definition: _rope.h:851

◆ operator[]()

template<class _CharT , class _Alloc >
_CharT _Rope_const_iterator< _CharT, _Alloc >::operator[] ( size_t  __n)
inline

Definition at line 2069 of file _rope.h.

2070{ return rope<_CharT,_Alloc>::_S_fetch(this->_M_root, this->_M_current_pos + __n); }
static _CharT _S_fetch(_RopeRep *__r, size_type __pos)
Definition: _rope.c:1123

Friends And Related Function Documentation

◆ rope< _CharT, _Alloc >

template<class _CharT , class _Alloc >
friend class rope< _CharT, _Alloc >
friend

Definition at line 807 of file _rope.h.


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