xlnt
|
A range_reference describes a rectangular area of a worksheet with positive width and height defined by a top-left and bottom-right corner. More...
#include <range_reference.hpp>
Public Member Functions | |
range_reference () | |
Constructs a range reference equal to A1:A1 More... | |
range_reference (const std::string &range_string) | |
Constructs a range reference equivalent to the provided range_string in the form top_left:bottom_right. More... | |
range_reference (const char *range_string) | |
Constructs a range reference equivalent to the provided range_string in the form top_left:bottom_right. More... | |
range_reference (const cell_reference &start, const cell_reference &end) | |
Constructs a range reference from cell references indicating top left and bottom right coordinates of the range. More... | |
range_reference (column_t column_index_start, row_t row_index_start, column_t column_index_end, row_t row_index_end) | |
Constructs a range reference from column and row indices. More... | |
bool | is_single_cell () const |
Returns true if the range has a width and height of 1 cell. More... | |
std::size_t | width () const |
Returns the number of columns encompassed by this range. More... | |
std::size_t | height () const |
Returns the number of rows encompassed by this range. More... | |
cell_reference | top_left () const |
Returns the coordinate of the top left cell of this range. More... | |
cell_reference | top_right () const |
Returns the coordinate of the top right cell of this range. More... | |
cell_reference | bottom_left () const |
Returns the coordinate of the bottom left cell of this range. More... | |
cell_reference | bottom_right () const |
Returns the coordinate of the bottom right cell of this range. More... | |
range_reference | make_offset (int column_offset, int row_offset) const |
Returns a new range reference with the same width and height as this range but shifted by the given number of columns and rows. More... | |
std::string | to_string () const |
Returns a string representation of this range. More... | |
bool | contains (const cell_reference &ref) const |
Returns true if the given cell reference is within the bounds of this range reference. More... | |
bool | operator== (const range_reference &comparand) const |
Returns true if this range is equivalent to the other range. More... | |
bool | operator== (const std::string &reference_string) const |
Returns true if this range is equivalent to the string representation of the other range. More... | |
bool | operator== (const char *reference_string) const |
Returns true if this range is equivalent to the string representation of the other range. More... | |
bool | operator!= (const range_reference &comparand) const |
Returns true if this range is not equivalent to the other range. More... | |
bool | operator!= (const std::string &reference_string) const |
Returns true if this range is not equivalent to the string representation of the other range. More... | |
bool | operator!= (const char *reference_string) const |
Returns true if this range is not equivalent to the string representation of the other range. More... | |
Static Public Member Functions | |
static range_reference | make_absolute (const range_reference &relative_reference) |
Converts relative reference coordinates to absolute coordinates (B12 -> $B$12) More... | |
A range_reference describes a rectangular area of a worksheet with positive width and height defined by a top-left and bottom-right corner.
xlnt::range_reference::range_reference | ( | ) |
Constructs a range reference equal to A1:A1
|
explicit |
Constructs a range reference equivalent to the provided range_string in the form top_left:bottom_right.
|
explicit |
Constructs a range reference equivalent to the provided range_string in the form top_left:bottom_right.
xlnt::range_reference::range_reference | ( | const cell_reference & | start, |
const cell_reference & | end | ||
) |
Constructs a range reference from cell references indicating top left and bottom right coordinates of the range.
xlnt::range_reference::range_reference | ( | column_t | column_index_start, |
row_t | row_index_start, | ||
column_t | column_index_end, | ||
row_t | row_index_end | ||
) |
Constructs a range reference from column and row indices.
cell_reference xlnt::range_reference::bottom_left | ( | ) | const |
Returns the coordinate of the bottom left cell of this range.
cell_reference xlnt::range_reference::bottom_right | ( | ) | const |
Returns the coordinate of the bottom right cell of this range.
bool xlnt::range_reference::contains | ( | const cell_reference & | ref | ) | const |
Returns true if the given cell reference is within the bounds of this range reference.
std::size_t xlnt::range_reference::height | ( | ) | const |
Returns the number of rows encompassed by this range.
bool xlnt::range_reference::is_single_cell | ( | ) | const |
Returns true if the range has a width and height of 1 cell.
|
static |
Converts relative reference coordinates to absolute coordinates (B12 -> $B$12)
range_reference xlnt::range_reference::make_offset | ( | int | column_offset, |
int | row_offset | ||
) | const |
Returns a new range reference with the same width and height as this range but shifted by the given number of columns and rows.
bool xlnt::range_reference::operator!= | ( | const range_reference & | comparand | ) | const |
Returns true if this range is not equivalent to the other range.
bool xlnt::range_reference::operator!= | ( | const std::string & | reference_string | ) | const |
Returns true if this range is not equivalent to the string representation of the other range.
bool xlnt::range_reference::operator!= | ( | const char * | reference_string | ) | const |
Returns true if this range is not equivalent to the string representation of the other range.
bool xlnt::range_reference::operator== | ( | const range_reference & | comparand | ) | const |
Returns true if this range is equivalent to the other range.
bool xlnt::range_reference::operator== | ( | const std::string & | reference_string | ) | const |
Returns true if this range is equivalent to the string representation of the other range.
bool xlnt::range_reference::operator== | ( | const char * | reference_string | ) | const |
Returns true if this range is equivalent to the string representation of the other range.
std::string xlnt::range_reference::to_string | ( | ) | const |
Returns a string representation of this range.
cell_reference xlnt::range_reference::top_left | ( | ) | const |
Returns the coordinate of the top left cell of this range.
cell_reference xlnt::range_reference::top_right | ( | ) | const |
Returns the coordinate of the top right cell of this range.
std::size_t xlnt::range_reference::width | ( | ) | const |
Returns the number of columns encompassed by this range.