range_t
Defined in header: <ixion/address.hpp>
-
struct range_t
Stores range whose component may be relative or absolute.
Public Functions
-
range_t()
Construct a range covering the top-left cell of the first sheet.
-
range_t(const address_t &_first, const address_t &_last)
Construct a range from its top-left and bottom-right addresses.
-
range_t(const abs_range_t &r)
Construct a range with all components absolute.
-
bool valid() const
Check whether both addresses of the range are 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.
-
abs_range_t to_abs(const abs_address_t &origin) const
Convert the range to an absolute range. Each relative component of either address gets added to the corresponding component of the origin.
- Parameters:
origin – Position of the cell the range is used in.
- Returns:
Absolute range.
-
void set_absolute(bool abs)
Set all components of both addresses absolute or relative.
Public Members
-
struct hash
Hash function for use in unordered containers.
-
range_t()