13 template<
typename CounterType>
27 return !((*this) == _it);
113 template<
typename DerivedCounter>
136 Access _access =
Access(),
137 Compare _compare =
Compare()) :
150 operator bool()
const {
158 operator const Container &()
const {
187 bool compare(
const value_type &A,
const value_type &B) {
203 const value_type &
current(size_type index)
const {
227 const Container &
final()
const {
250 const value_type &
_current(size_type index)
const {
275 const value_type &
_initial(size_type index)
const {
291 const value_type &
_final(size_type index)
const {
323 const value_type &
_upper(size_type index)
const {
339 const value_type &
_lower(size_type index)
const {
const value_type & _final(size_type index) const
const Container & current() const
const value_type & current(size_type index) const
Container m_initial
Initial container values.
CounterType::value_type value_type
Container m_current
The current state of the container.
const Container & operator()() const
Container m_lower
The minimum of each value of m_initial and m_final.
const Container & increment() const
value_type const * operator->() const
Container m_increment
Amount to increment each container value.
const value_type & operator[](size_type index) const
BaseCounter()
Default construct a Counter.
CounterValueIterator & operator++()
value_type & _lower(size_type index)
const value_type & _upper(size_type index) const
CounterValueIterator< DerivedCounter > const_value_iterator
const_value_iterator value_end() const
bool & _valid()
non-const reference bool validity flag
Container m_final
Final container values.
value_type & _initial(size_type index)
CASM_TMP::traits< DerivedCounter >::Compare Compare
Compare m_compare
A functor that enables custom comparison, by default: operator<.
const value_type & _increment(size_type index) const
CASM_TMP::traits< DerivedCounter >::value_type value_type
CASM_TMP::traits< DerivedCounter >::Access Access
CounterValueIterator(CounterType const *_counter_ptr=nullptr, size_type _ind=0)
CounterType const * m_counter_ptr
A Counter allows looping over many incrementing variables in one loop.
bool operator!=(const CounterValueIterator &_it)
CounterType::size_type size_type
value_type & _current(size_type index)
const value_type & _current(size_type index) const
value_type & _increment(size_type index)
Container m_upper
The maximum of each value of m_initial and m_final.
CASM_TMP::traits< DerivedCounter >::Container Container
value_type & _final(size_type index)
const value_type & operator*() const
bool operator==(const CounterValueIterator &_it)
CounterValueIterator operator++(int)
const value_type & _initial(size_type index) const
const_value_iterator value_begin() const
BaseCounter(const Container &_initial, const Container &_final, const Container &_increment, Access _access=Access(), Compare _compare=Compare())
Construct a Counter-type object.
CASM_TMP::traits< DerivedCounter >::size_type size_type
const Container & initial() const
bool compare(const value_type &A, const value_type &B)
const value_type & _lower(size_type index) const
Access m_access
A functor that enables different ways of accessing the container, by default: container[index].
value_type & _upper(size_type index)