rc_range_t

Defined in header: <ixion/address.hpp>

struct rc_range_t

Stores range whose component may be relative or absolute, but unlike the range_t counterpart, this struct only stores row and column positions. The “rc” in the name stands for row and column.

Public Functions

rc_range_t()

Construct a range covering the top-left cell.

rc_range_t(const rc_address_t &_first, const rc_address_t &_last)

Construct a range from its top-left and bottom-right addresses.

rc_range_t(const rc_range_t &r)

Copy constructor.

rc_range_t(const abs_rc_range_t &r)

Construct a range with all components absolute.

bool valid() const

Check whether the range is valid.

void set_all_columns()

Expand the range horizontally to include all columns. The row range will remain unchanged.

void set_all_rows()

Expand the range vertically to include all rows. The column range will remain unchanged.

bool all_columns() const
Returns:

true if the range is unspecified in the horizontal direction i.e. all columns are selected, false otherwise.

bool all_rows() const
Returns:

true if the range is unspecified in the vertical direction i.e. all rows are selected, false otherwise.

Public Members

rc_address_t first

Address of the top-left cell of the range.

rc_address_t last

Address of the bottom-right cell of the range.

struct hash

Hash function for use in unordered containers.

Public Functions

size_t operator()(const rc_range_t &range) const

Compute the hash value of a range.