abs_rc_range_t
Defined in header: <ixion/address.hpp>
-
struct abs_rc_range_t
Stores absolute range address, but unlike the abs_range_t counterpart, this struct only stores row and column positions. The “rc” in the name stands for row and column.
Public Types
Public Functions
-
abs_rc_range_t()
Construct a range covering the top-left cell.
-
abs_rc_range_t(init_invalid)
Construct an invalid range, with both positions invalid.
-
abs_rc_range_t(const abs_rc_range_t &other)
Copy constructor.
-
explicit abs_rc_range_t(const abs_range_t &other)
Construct a range from a range with a sheet, dropping the sheet.
-
abs_rc_range_t(row_t _row, col_t _col, row_t _row_span, col_t _col_span)
Construct a range from its top-left cell and its size.
- Parameters:
_row – 0-based row position of the top-left cell of the range.
_col – 0-based column position of the top-left cell of the range.
_row_span – Row length of the range. It must be 1 or greater.
_col_span – Column length of the range. It must be 1 or greater.
-
bool valid() const
Check whether the range is valid, that is, both positions are valid and the first position does not follow the last one in any direction.
-
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.
-
bool contains(const abs_rc_address_t &addr) const
Check whether or not a given address is contained within this range.
-
std::strong_ordering operator<=>(const abs_rc_range_t &r) const
Order ranges by their first position, then their last position.
-
bool operator==(const abs_rc_range_t &r) const
Compare both positions of two ranges.
Public Members
-
abs_rc_address_t first
Position of the top-left cell of the range.
-
abs_rc_address_t last
Position of the bottom-right cell of the range.
-
struct hash
Hash function for use in unordered containers.
Public Functions
-
size_t operator()(const abs_rc_range_t &range) const
Compute the hash value of a range.
-
size_t operator()(const abs_rc_range_t &range) const
-
abs_rc_range_t()