ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
TBitSet< TInterface, TEnd, TBegin >::TBidiIterator< TBitSetCM, isReverse > Class Template Reference

Description:

template<typename TInterface, TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM, bool isReverse>
class alib::lang::TBitSet< TInterface, TEnd, TBegin >::TBidiIterator< TBitSetCM, isReverse >

Implementation of std::iterator_traits for class TBitSet. As the name of the class indicates, this iterator satisfies the C++ standard library concept of bidirectional iterators. The template parameters allow this type to act as a const or mutable as well as a forward or backward iterator.
The public available type definitions which specify the template parameters and are returned from the various begin() and end() variants of the outer class are:

Template Parameters
TBitSetCMA constant or mutable TBitSet.
isReverseIf set, this iterator is a swaps ++ and – operators.

Definition at line 640 of file bitset.hpp.

#include <bitset.hpp>

Public Type Index:

using difference_type = int
 Implementation of std::iterator_traits.
 
using iterator_category = std::bidirectional_iterator_tag
 Implementation of std::iterator_traits.
 
using pointer = void
 Implementation of std::iterator_traits.
 
using reference = Reference<TBitSetCM>&
 Implementation of std::iterator_traits.
 
using value_type = TInterface
 Implementation of std::iterator_traits.
 

Public Method Index:

 TBidiIterator (TBitSetCM &bitSet, TInterface startBit)
 
bool operator!= (const TBidiIterator &other) const
 
reference operator* ()
 
TBidiIteratoroperator++ ()
 
TBidiIterator operator++ (int)
 
TBidiIteratoroperator-- ()
 
TBidiIterator operator-- (int)
 
bool operator< (TBidiIterator other) const
 
bool operator<= (TBidiIterator other) const
 
bool operator== (const TBidiIterator &other) const
 
bool operator> (TBidiIterator other) const
 
bool operator>= (TBidiIterator other) const
 

Type Definition Details:

◆ difference_type

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
using difference_type = int

Implementation of std::iterator_traits.

Definition at line 645 of file bitset.hpp.

◆ iterator_category

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
using iterator_category = std::bidirectional_iterator_tag

Implementation of std::iterator_traits.

Definition at line 643 of file bitset.hpp.

◆ pointer

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
using pointer = void

Implementation of std::iterator_traits.

Definition at line 646 of file bitset.hpp.

◆ reference

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
using reference = Reference<TBitSetCM>&

Implementation of std::iterator_traits.

Definition at line 647 of file bitset.hpp.

◆ value_type

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
using value_type = TInterface

Implementation of std::iterator_traits.

Definition at line 644 of file bitset.hpp.

Field Details:

◆ ref

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
Reference<TBitSetCM> ref
protected

The bit this iterator currently addresses. This is true for forward and reverse iterators. (Because this is not using the std::reverse_iterator< which would implement an reverse iterator that points 'before' the current element. *‍/

Definition at line 653 of file bitset.hpp.

Constructor(s) / Destructor Details::

◆ TBidiIterator()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
TBidiIterator ( TBitSetCM & bitSet,
TInterface startBit )
inlineexplicit

Constructor.

Parameters
bitSetThe bit set to use.
startBitThe bit number to start with.

Definition at line 729 of file bitset.hpp.

Method Details:

◆ down()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
TBidiIterator & down ( )
inlineprotected

Searches and moves this iterator to the next lower bit is. In case no lower bit is found, the iterator will points to illegal bit number -1.

Returns
A reference to this object. *‍/

Definition at line 691 of file bitset.hpp.

Here is the call graph for this function:

◆ operator!=()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
bool operator!= ( const TBidiIterator< TBitSetCM, isReverse > & other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and given iterator are not equal, false otherwise.

Definition at line 763 of file bitset.hpp.

◆ operator*()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
reference operator* ( )
inline

Retrieves a reference to the internal Reference member that this iterator uses.

Returns
The reference to the bit this iterator is currently addressing.

Definition at line 771 of file bitset.hpp.

◆ operator++() [1/2]

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
TBidiIterator & operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object.

Definition at line 736 of file bitset.hpp.

Here is the call graph for this function:

◆ operator++() [2/2]

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
TBidiIterator operator++ ( int )
inline

Postfix increment operator.

Returns
An iterator value that is not increased, yet. *‍/

Definition at line 744 of file bitset.hpp.

◆ operator--() [1/2]

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
TBidiIterator & operator-- ( )
inline

Prefix decrement operator.

Returns
A reference to this object. *‍/

Definition at line 779 of file bitset.hpp.

Here is the call graph for this function:

◆ operator--() [2/2]

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
TBidiIterator operator-- ( int )
inline

Postfix decrement operator.

Returns
The iterator value prior the decrement operation. *‍/

Definition at line 787 of file bitset.hpp.

◆ operator<()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
bool operator< ( TBidiIterator< TBitSetCM, isReverse > other) const
inline

Compares this iterator with the given one.

Parameters
otherThe iterator to compare
Returns
true if this iterator is smaller than other , false otherwise.

Definition at line 799 of file bitset.hpp.

◆ operator<=()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
bool operator<= ( TBidiIterator< TBitSetCM, isReverse > other) const
inline

Compares this iterator with the given one.

Parameters
otherThe iterator to compare
Returns
true if this iterator is smaller than or equal to other , false otherwise. *‍/

Definition at line 806 of file bitset.hpp.

◆ operator==()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
bool operator== ( const TBidiIterator< TBitSetCM, isReverse > & other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and the given iterator are pointing to the same bit in the same set, false otherwise.

Definition at line 755 of file bitset.hpp.

◆ operator>()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
bool operator> ( TBidiIterator< TBitSetCM, isReverse > other) const
inline

Compares this iterator with the given one.

Parameters
otherThe iterator to compare
Returns
true if this iterator is greater than other , false otherwise.

Definition at line 813 of file bitset.hpp.

◆ operator>=()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
bool operator>= ( TBidiIterator< TBitSetCM, isReverse > other) const
inline

Compares this iterator with the given one.

Parameters
otherThe iterator to compare
Returns
true if this iterator is greater than or equal to other , false otherwise.

Definition at line 820 of file bitset.hpp.

◆ up()

template<typename TInterface , TInterface TEnd, TInterface TBegin = 0>
template<typename TBitSetCM , bool isReverse>
TBidiIterator & up ( )
inlineprotected

Searches and moves this iterator to the next higher bit is. In case no further bit is found, the iterator will points to illegal bit number TBitSet::Capacity

Returns
A reference to this object.

Definition at line 658 of file bitset.hpp.

Here is the call graph for this function:

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