Destructive iterator used by sparse_table. More...
#include <ash/sparse_table.h>
Public Types | |
typedef destructive_two_d_iterator | iterator |
typedef Container::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::nonempty_iterator | col_iterator |
Iterator Traits | |
typedef std::input_iterator_tag | iterator_category |
typedef _tmp_vt::value_type | value_type |
typedef _tmp_vt::difference_type | difference_type |
typedef _tmp_vt::reference | reference |
typedef _tmp_vt::pointer | pointer |
Public Member Functions | |
void | advance_past_end () |
Constructors/Destructors | |
We use the default copy constructor. We use the default destructor. | |
destructive_two_d_iterator () | |
Default constructor. | |
destructive_two_d_iterator (row_iterator begin, row_iterator end, row_iterator curr) | |
"Real" constructor. | |
destructive_two_d_iterator (row_iterator begin, row_iterator end, row_iterator curr, col_iterator col) | |
Constructor for starting at an arbitrary column. | |
Dereference Operators | |
reference | operator* () const |
pointer | operator-> () const |
Arithmetic Operators | |
iterator & | operator++ () |
Pre-increment. | |
iterator | operator++ (int) |
Post-increment. | |
Comparison Operators | |
We only define ==, != is defined in std::rel_ops. | |
bool | operator== (const iterator &itr) const |
Equality operator. | |
Public Attributes | |
row_iterator | row_begin |
row_iterator | row_end |
row_iterator | row_current |
col_iterator | col_current |
Destructive iterator used by sparse_table.
Container | The container type to iterate through. |
We provide yet another version, to be as frugal with memory as possible. This one frees each block of memory as it finishes iterating over it. By the end, the entire table is freed. For understandable reasons, you can only iterate over it once, which is why it's an input iterator.
typedef Container::value_type ash::destructive_two_d_iterator< Container >::_tmp_vt |
Apparently some versions of VC++ have trouble with two ::'s in a typename.
ash::destructive_two_d_iterator< Container >::destructive_two_d_iterator | ( | ) | [inline] |
Default constructor.
ash::destructive_two_d_iterator< Container >::destructive_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::destructive_two_d_iterator< Container >::destructive_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. |
iterator& ash::destructive_two_d_iterator< Container >::operator++ | ( | ) | [inline] |
Pre-increment.
iterator ash::destructive_two_d_iterator< Container >::operator++ | ( | int | ) | [inline] |
Post-increment.
bool ash::destructive_two_d_iterator< Container >::operator== | ( | const iterator & | itr | ) | const [inline] |
Equality operator.
© 2012 | Licensed under | Hosted by | Generated by 1.7.4 |