A class to manage an index and an iterator easily. More...
#include <it_index.hpp>
Public Types | |
typedef std::iterator_traits < T >::value_type | value_type |
typedef std::iterator_traits < T >::difference_type | difference_type |
typedef std::iterator_traits < T >::pointer | pointer |
typedef std::iterator_traits < T >::reference | reference |
Public Member Functions | |
it_index () | |
Constructor. | |
it_index (const T &it, int index=0) | |
Constructor. | |
it_index (const it_index< T > &that) | |
Copy constructor. | |
void | set (const T &it, int index) |
Change the current pair. | |
bool | operator< (const it_index< T > &that) const |
bool | operator< (const T &it) const |
bool | operator< (int index) const |
bool | operator<= (const it_index< T > &that) const |
bool | operator<= (const T &it) const |
bool | operator<= (int index) const |
bool | operator> (const it_index< T > &that) const |
bool | operator> (const T &it) const |
bool | operator> (int index) const |
bool | operator>= (const it_index< T > &that) const |
bool | operator>= (const T &it) const |
bool | operator>= (int index) const |
bool | operator== (const it_index< T > &that) const |
bool | operator== (const T &it) const |
bool | operator== (int index) const |
bool | operator!= (const it_index< T > &that) const |
bool | operator!= (const T &it) const |
bool | operator!= (int index) const |
it_index< T > | operator+ (int index) const |
it_index< T > | operator- (int index) const |
it_index< T > | operator* (int index) const |
it_index< T > | operator/ (int index) const |
reference | operator* () const |
pointer | operator-> () const |
it_index< T > & | operator++ () |
it_index< T > | operator++ (int) |
it_index< T > & | operator-- () |
it_index< T > | operator-- (int) |
it_index< T > & | operator+= (int index) |
it_index< T > & | operator-= (int index) |
it_index< T > & | operator*= (int index) |
it_index< T > & | operator/= (int index) |
operator int () const | |
operator T () const | |
Private Attributes | |
T | m_it |
Iterator. | |
int | m_index |
Iterator's position. |
A class to manage an index and an iterator easily.
T | Type of the iterator. |
Definition at line 42 of file it_index.hpp.
typedef std::iterator_traits<T>::difference_type claw::it_index< T >::difference_type |
Definition at line 46 of file it_index.hpp.
typedef std::iterator_traits<T>::pointer claw::it_index< T >::pointer |
Definition at line 47 of file it_index.hpp.
typedef std::iterator_traits<T>::reference claw::it_index< T >::reference |
Definition at line 48 of file it_index.hpp.
typedef std::iterator_traits<T>::value_type claw::it_index< T >::value_type |
Definition at line 45 of file it_index.hpp.
claw::it_index< T >::it_index | ( | ) | [inline] |
claw::it_index< T >::it_index | ( | const T & | it, |
int | index = 0 |
||
) | [inline] |
Constructor.
it | The iterator. |
index | Iterator's position. |
Definition at line 68 of file it_index.hpp.
claw::it_index< T >::it_index | ( | const it_index< T > & | that ) | [inline] |
Copy constructor.
that | it_index to copy from. |
Definition at line 76 of file it_index.hpp.
claw::it_index< T >::operator int | ( | ) | const [inline] |
Definition at line 194 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index; }
claw::it_index< T >::operator T | ( | ) | const [inline] |
bool claw::it_index< T >::operator!= | ( | const it_index< T > & | that ) | const [inline] |
Definition at line 117 of file it_index.hpp.
{ return !(*this == *that); }
bool claw::it_index< T >::operator!= | ( | const T & | it ) | const [inline] |
Definition at line 119 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return m_it != it; }
bool claw::it_index< T >::operator!= | ( | int | index ) | const [inline] |
Definition at line 120 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index!=index; }
it_index<T> claw::it_index< T >::operator* | ( | int | index ) | const [inline] |
Definition at line 126 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
reference claw::it_index< T >::operator* | ( | ) | const [inline] |
Definition at line 131 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return *m_it; }
it_index<T>& claw::it_index< T >::operator*= | ( | int | index ) | [inline] |
Definition at line 180 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
it_index<T> claw::it_index< T >::operator+ | ( | int | index ) | const [inline] |
Definition at line 122 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
it_index<T>& claw::it_index< T >::operator++ | ( | ) | [inline] |
Definition at line 135 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
it_index<T> claw::it_index< T >::operator++ | ( | int | ) | [inline] |
Definition at line 143 of file it_index.hpp.
{ it_index<T> r(*this); ++(this); return r; }
it_index<T>& claw::it_index< T >::operator+= | ( | int | index ) | [inline] |
Definition at line 166 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
it_index<T> claw::it_index< T >::operator- | ( | int | index ) | const [inline] |
Definition at line 124 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
it_index<T> claw::it_index< T >::operator-- | ( | int | ) | [inline] |
Definition at line 159 of file it_index.hpp.
{ it_index<T> r(*this); --(this); return r; }
it_index<T>& claw::it_index< T >::operator-- | ( | ) | [inline] |
Definition at line 151 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
it_index<T>& claw::it_index< T >::operator-= | ( | int | index ) | [inline] |
Definition at line 173 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
pointer claw::it_index< T >::operator-> | ( | ) | const [inline] |
Definition at line 132 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return &*m_it; }
it_index<T> claw::it_index< T >::operator/ | ( | int | index ) | const [inline] |
Definition at line 128 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
it_index<T>& claw::it_index< T >::operator/= | ( | int | index ) | [inline] |
Definition at line 187 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
bool claw::it_index< T >::operator< | ( | int | index ) | const [inline] |
Definition at line 95 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index < index; }
bool claw::it_index< T >::operator< | ( | const it_index< T > & | that ) | const [inline] |
Definition at line 91 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index < that.m_index; }
bool claw::it_index< T >::operator< | ( | const T & | it ) | const [inline] |
Definition at line 94 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return m_it < it; }
bool claw::it_index< T >::operator<= | ( | const it_index< T > & | that ) | const [inline] |
Definition at line 97 of file it_index.hpp.
{ return (*this < that) || (*this == that); }
bool claw::it_index< T >::operator<= | ( | int | index ) | const [inline] |
Definition at line 100 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index <= index; }
bool claw::it_index< T >::operator<= | ( | const T & | it ) | const [inline] |
Definition at line 99 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return m_it <= it; }
bool claw::it_index< T >::operator== | ( | int | index ) | const [inline] |
Definition at line 115 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index==index; }
bool claw::it_index< T >::operator== | ( | const it_index< T > & | that ) | const [inline] |
Definition at line 112 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
bool claw::it_index< T >::operator== | ( | const T & | it ) | const [inline] |
Definition at line 114 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return m_it == it; }
bool claw::it_index< T >::operator> | ( | int | index ) | const [inline] |
Definition at line 105 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index > index; }
bool claw::it_index< T >::operator> | ( | const it_index< T > & | that ) | const [inline] |
Definition at line 102 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index > that.m_index; }
bool claw::it_index< T >::operator> | ( | const T & | it ) | const [inline] |
Definition at line 104 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return m_it > it; }
bool claw::it_index< T >::operator>= | ( | const T & | it ) | const [inline] |
Definition at line 109 of file it_index.hpp.
References claw::it_index< T >::m_it.
{ return m_it >= it; }
bool claw::it_index< T >::operator>= | ( | int | index ) | const [inline] |
Definition at line 110 of file it_index.hpp.
References claw::it_index< T >::m_index.
{ return m_index >= index; }
bool claw::it_index< T >::operator>= | ( | const it_index< T > & | that ) | const [inline] |
Definition at line 107 of file it_index.hpp.
{ return (*this > that) || (*this == that); }
void claw::it_index< T >::set | ( | const T & | it, |
int | index | ||
) | [inline] |
Change the current pair.
it | The new iterator. |
index | New iterator's position. |
Definition at line 85 of file it_index.hpp.
References claw::it_index< T >::m_index, and claw::it_index< T >::m_it.
Referenced by claw::text::kmp< RandomIterator >::operator()().
int claw::it_index< T >::m_index [private] |
Iterator's position.
Definition at line 55 of file it_index.hpp.
Referenced by claw::it_index< T >::operator int(), claw::it_index< T >::operator!=(), claw::it_index< T >::operator*(), claw::it_index< T >::operator*=(), claw::it_index< T >::operator+(), claw::it_index< T >::operator++(), claw::it_index< T >::operator+=(), claw::it_index< T >::operator-(), claw::it_index< T >::operator--(), claw::it_index< T >::operator-=(), claw::it_index< T >::operator/(), claw::it_index< T >::operator/=(), claw::it_index< T >::operator<(), claw::it_index< T >::operator<=(), claw::it_index< T >::operator==(), claw::it_index< T >::operator>(), claw::it_index< T >::operator>=(), and claw::it_index< T >::set().
T claw::it_index< T >::m_it [private] |
Iterator.
Definition at line 52 of file it_index.hpp.
Referenced by claw::it_index< T >::operator T(), claw::it_index< T >::operator!=(), claw::it_index< T >::operator*(), claw::it_index< T >::operator*=(), claw::it_index< T >::operator+(), claw::it_index< T >::operator++(), claw::it_index< T >::operator+=(), claw::it_index< T >::operator-(), claw::it_index< T >::operator--(), claw::it_index< T >::operator-=(), claw::it_index< T >::operator->(), claw::it_index< T >::operator/(), claw::it_index< T >::operator/=(), claw::it_index< T >::operator<(), claw::it_index< T >::operator<=(), claw::it_index< T >::operator==(), claw::it_index< T >::operator>(), claw::it_index< T >::operator>=(), and claw::it_index< T >::set().