alternative Standard Libary  0.29.8
std::ring_buffer_iterator< T, E > Template-Klassenreferenz

#include <ringbuffer.hpp>

Öffentliche Typen

using value_type = T
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 
using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using self_type = ring_buffer_iterator< T >
 

Öffentliche Methoden

 ring_buffer_iterator (pointer b, size_t start_pos)
 
 ring_buffer_iterator (const ring_buffer_iterator &it)
 
ring_buffer_iteratoroperator= (const ring_buffer_iterator &it)
 
E & operator* ()
 
E * operator-> ()
 
self_typeoperator++ ()
 
self_typeoperator-- ()
 
self_type operator++ (int)
 
self_type operator-- (int)
 
self_type operator+ (difference_type n)
 
self_type operator- (difference_type n)
 
self_typeoperator+= (difference_type n)
 
self_typeoperator-= (difference_type n)
 
bool operator== (const self_type &other) const
 
bool operator!= (const self_type &other) const
 
value_typeoperator[] (difference_type n) const
 
bool operator< (const self_type &it) const
 
bool operator> (const self_type &it) const
 
bool operator<= (const self_type &it) const
 
bool operator>= (const self_type &it) const
 

Ausführliche Beschreibung

template<typename T, typename E = typename T::value_type>
class std::ring_buffer_iterator< T, E >

Dokumentation der benutzerdefinierten Datentypen

◆ const_pointer

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::const_pointer = const T*

◆ const_reference

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::const_reference = const T&

◆ difference_type

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::difference_type = ptrdiff_t

◆ pointer

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::pointer = T*

◆ reference

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::reference = T&

◆ self_type

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::self_type = ring_buffer_iterator<T>

◆ size_type

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::size_type = size_t

◆ value_type

template<typename T , typename E = typename T::value_type>
using std::ring_buffer_iterator< T, E >::value_type = T

Beschreibung der Konstruktoren und Destruktoren

◆ ring_buffer_iterator() [1/2]

template<typename T , typename E = typename T::value_type>
std::ring_buffer_iterator< T, E >::ring_buffer_iterator ( pointer  b,
size_t  start_pos 
)
inline
54  : m_buf(b), m_pos(start_pos) { }

◆ ring_buffer_iterator() [2/2]

template<typename T , typename E = typename T::value_type>
std::ring_buffer_iterator< T, E >::ring_buffer_iterator ( const ring_buffer_iterator< T, E > &  it)
inline
56  : m_buf(it.m_buf), m_pos(it.m_pos) { }

Dokumentation der Elementfunktionen

◆ operator!=()

template<typename T , typename E = typename T::value_type>
bool std::ring_buffer_iterator< T, E >::operator!= ( const self_type other) const
inline
107  {
108  return (this->m_pos != other.m_pos);
109  }

◆ operator*()

template<typename T , typename E = typename T::value_type>
E& std::ring_buffer_iterator< T, E >::operator* ( )
inline
62  {
63  return (*m_buf)[m_pos];
64  }

◆ operator+()

template<typename T , typename E = typename T::value_type>
self_type std::ring_buffer_iterator< T, E >::operator+ ( difference_type  n)
inline
86  {
87  self_type tmp(*this);
88  tmp.m_pos += n;
89  return tmp;
90  }
ring_buffer_iterator< T > self_type
Definition: ringbuffer.hpp:51

◆ operator++() [1/2]

template<typename T , typename E = typename T::value_type>
self_type& std::ring_buffer_iterator< T, E >::operator++ ( )
inline
68  {
69  ++m_pos;
70  return *this;
71  }

◆ operator++() [2/2]

template<typename T , typename E = typename T::value_type>
self_type std::ring_buffer_iterator< T, E >::operator++ ( int  )
inline
76  {
77  self_type tmp(*this);
78  ++(*this);
79  return tmp;
80  }
ring_buffer_iterator< T > self_type
Definition: ringbuffer.hpp:51

◆ operator+=()

template<typename T , typename E = typename T::value_type>
self_type& std::ring_buffer_iterator< T, E >::operator+= ( difference_type  n)
inline
96  {
97  m_pos += n;
98  return *this;
99  }

◆ operator-()

template<typename T , typename E = typename T::value_type>
self_type std::ring_buffer_iterator< T, E >::operator- ( difference_type  n)
inline
91  {
92  self_type tmp(*this);
93  tmp.m_pos -= n;
94  return tmp;
95  }
ring_buffer_iterator< T > self_type
Definition: ringbuffer.hpp:51

◆ operator--() [1/2]

template<typename T , typename E = typename T::value_type>
self_type& std::ring_buffer_iterator< T, E >::operator-- ( )
inline
72  {
73  --m_pos;
74  return *this;
75  }

◆ operator--() [2/2]

template<typename T , typename E = typename T::value_type>
self_type std::ring_buffer_iterator< T, E >::operator-- ( int  )
inline
81  {
82  self_type tmp(*this);
83  --(*this);
84  return tmp;
85  }
ring_buffer_iterator< T > self_type
Definition: ringbuffer.hpp:51

◆ operator-=()

template<typename T , typename E = typename T::value_type>
self_type& std::ring_buffer_iterator< T, E >::operator-= ( difference_type  n)
inline
100  {
101  m_pos -= n;
102  return *this;
103  }

◆ operator->()

template<typename T , typename E = typename T::value_type>
E* std::ring_buffer_iterator< T, E >::operator-> ( )
inline
65  {
66  return &(operator*());
67  }
E & operator*()
Definition: ringbuffer.hpp:62

◆ operator<()

template<typename T , typename E = typename T::value_type>
bool std::ring_buffer_iterator< T, E >::operator< ( const self_type it) const
inline
113  {
114  return m_pos < it.m_pos;
115  }

◆ operator<=()

template<typename T , typename E = typename T::value_type>
bool std::ring_buffer_iterator< T, E >::operator<= ( const self_type it) const
inline
119  {
120  return !(it < *this);
121  }

◆ operator=()

template<typename T , typename E = typename T::value_type>
ring_buffer_iterator& std::ring_buffer_iterator< T, E >::operator= ( const ring_buffer_iterator< T, E > &  it)
inline
58  {
59  m_buf = it.m_buf; m_pos = it.m_pos; return *this;
60  }

◆ operator==()

template<typename T , typename E = typename T::value_type>
bool std::ring_buffer_iterator< T, E >::operator== ( const self_type other) const
inline
104  {
105  return (this->m_pos == other.m_pos);
106  }

◆ operator>()

template<typename T , typename E = typename T::value_type>
bool std::ring_buffer_iterator< T, E >::operator> ( const self_type it) const
inline
116  {
117  return it < *this;
118  }

◆ operator>=()

template<typename T , typename E = typename T::value_type>
bool std::ring_buffer_iterator< T, E >::operator>= ( const self_type it) const
inline
122  {
123  return !(*this < it);
124  }

◆ operator[]()

template<typename T , typename E = typename T::value_type>
value_type& std::ring_buffer_iterator< T, E >::operator[] ( difference_type  n) const
inline
110  {
111  return *(*this + n);
112  }

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: