abs_address_range

Defined in header: <ixion/address_range.hpp>

class abs_address_range

STL-compliant range that yields every abs_address_t inside an abs_range_t one address at a time.

The iteration order is determined by the ixion::rc_direction_t value passed to the constructor:

  • horizontal walks row-major within each sheet (column varies fastest).

  • vertical walks column-major within each sheet (row varies fastest).

In either direction, iteration visits all cells before advancing to the next sheet.

The range purely walks the address space specified by the abs_range_t bounds; it does not reference any sheet contents. Use model_context::iterate_cells to iterate over cell values.

Public Functions

abs_address_range(const abs_range_t &range, rc_direction_t dir)

Constructor.

Parameters:
  • range – Range whose addresses to iterate over.

  • dir – Direction of the iteration.

~abs_address_range()
const_iterator begin() const

Get an iterator to the first address of the range.

const_iterator end() const

Get an iterator past the last address of the range.

const_iterator cbegin() const

Get an iterator to the first address of the range.

const_iterator cend() const

Get an iterator past the last address of the range.

class const_iterator

Bidirectional iterator over the addresses of an abs_address_range.

Public Types

using value_type = abs_address_t

Type of the values the iterator yields.

Public Functions

const_iterator()

Construct an iterator that refers to no range.

const_iterator(const const_iterator &r)

Copy constructor.

const_iterator(const_iterator &&r)

Move constructor.

~const_iterator()
const_iterator &operator++()

Advance to the next address.

const_iterator operator++(int)

Advance to the next address, returning the previous position.

const_iterator &operator--()

Move back to the previous address.

const_iterator operator--(int)

Move back to the previous address, returning the previous position.

const value_type &operator*() const

Get the current address.

const value_type *operator->() const

Get a pointer to the current address.

bool operator==(const const_iterator &r) const

Compare the positions of two iterators.