2D const iterator used by sparse_table. More...
#include <ash/sparse_table.h>
Public Types | |
typedef two_d_iterator< Container > | iterator |
typedef const_two_d_iterator | const_iterator |
typedef Container::const_iterator | row_iterator |
typedef Container::value_type | _tmp_vt |
Apparently some versions of VC++ have trouble with two ::'s in a typename. | |
typedef _tmp_vt::const_nonempty_iterator | col_iterator |
Iterator Traits | |
typedef std::bidirectional_iterator_tag | iterator_category |
typedef _tmp_vt::value_type | value_type |
typedef _tmp_vt::difference_type | difference_type |
typedef _tmp_vt::const_reference | reference |
typedef _tmp_vt::const_pointer | pointer |
Public Member Functions | |
void | advance_past_end () |
Constructors/Destructors | |
We use the default copy constructor. We use the default destructor. | |
const_two_d_iterator () | |
Default constructor. | |
const_two_d_iterator (row_iterator begin, row_iterator end, row_iterator curr) | |
"Real" constructor. | |
const_two_d_iterator (row_iterator begin, row_iterator end, row_iterator curr, col_iterator col) | |
Constructor for starting at an arbitrary column. | |
const_two_d_iterator (iterator const &itr) | |
Conversion constructor from an iterator. | |
Dereference Operators | |
reference | operator* () const |
pointer | operator-> () const |
Arithmetic Operators | |
const_iterator & | operator++ () |
Pre-increment. | |
const_iterator | operator++ (int) |
Post-increment. | |
const_iterator & | operator-- () |
Pre-decrement. | |
const_iterator | operator-- (int) |
Post-decrement. | |
Comparison Operators | |
We define != because std::rel_ops won't convert an iterator. | |
bool | operator== (const const_iterator &itr) const |
Equality operator. | |
bool | operator!= (const const_iterator &itr) const |
Inequality operator. | |
Public Attributes | |
row_iterator | row_begin |
row_iterator | row_end |
row_iterator | row_current |
col_iterator | col_current |
2D const iterator used by sparse_table.
2D iterator used by sparse_table.
Container | The container type we iterate through. |
This is a 2D iterator. You specify a begin and end over a list of containers. We iterate over each container by iterating over it. It's actually simple:
VECTOR.begin() VECTOR[0].begin() --------> VECTOR[0].end() ---, | ________________________________________________/ | \_> VECTOR[1].begin() --------> VECTOR[1].end() -, | ___________________________________________________/ v \_> ...... VECTOR.end()
typedef Container::value_type ash::const_two_d_iterator< Container >::_tmp_vt |
Apparently some versions of VC++ have trouble with two ::'s in a typename.
ash::const_two_d_iterator< Container >::const_two_d_iterator | ( | ) | [inline] |
Default constructor.
ash::const_two_d_iterator< Container >::const_two_d_iterator | ( | row_iterator | begin, |
row_iterator | end, | ||
row_iterator | curr | ||
) | [inline] |
"Real" constructor.
begin | The beginning of the range of rows. |
end | The end of the range of rows. |
curr | The current row. |
ash::const_two_d_iterator< Container >::const_two_d_iterator | ( | row_iterator | begin, |
row_iterator | end, | ||
row_iterator | curr, | ||
col_iterator | col | ||
) | [inline] |
Constructor for starting at an arbitrary column.
begin | The beginning of the range of rows. |
end | The end of the range of rows. |
curr | The current row. |
col | The current column. |
ash::const_two_d_iterator< Container >::const_two_d_iterator | ( | iterator const & | itr | ) | [inline] |
Conversion constructor from an iterator.
itr | The iterator to convert. |
bool ash::const_two_d_iterator< Container >::operator!= | ( | const const_iterator & | itr | ) | const [inline] |
Inequality operator.
const_iterator& ash::const_two_d_iterator< Container >::operator++ | ( | ) | [inline] |
Pre-increment.
const_iterator ash::const_two_d_iterator< Container >::operator++ | ( | int | ) | [inline] |
Post-increment.
const_iterator& ash::const_two_d_iterator< Container >::operator-- | ( | ) | [inline] |
Pre-decrement.
const_iterator ash::const_two_d_iterator< Container >::operator-- | ( | int | ) | [inline] |
Post-decrement.
bool ash::const_two_d_iterator< Container >::operator== | ( | const const_iterator & | itr | ) | const [inline] |
Equality operator.
© 2012 | Licensed under | Hosted by | Generated by 1.7.4 |