#include <XLCellReference.hpp>
|
| bool | operator== (const XLCellReference &lhs, const XLCellReference &rhs) noexcept |
| | Determines exact coordinate identity, allowing comparisons without resolving their DOM node equivalence.
|
| |
| bool | operator!= (const XLCellReference &lhs, const XLCellReference &rhs) noexcept |
| | Detects coordinate divergence, effectively identical to !(lhs == rhs).
|
| |
| bool | operator< (const XLCellReference &lhs, const XLCellReference &rhs) noexcept |
| | Evaluates precedence primarily by row, then by column, allowing cell ranges to be sorted efficiently and sequentially from left-to-right, top-to-bottom.
|
| |
| bool | operator> (const XLCellReference &lhs, const XLCellReference &rhs) noexcept |
| | Inverts the less-than operator logic to verify strict left-to-right, top-to-bottom traversal dominance.
|
| |
| bool | operator<= (const XLCellReference &lhs, const XLCellReference &rhs) noexcept |
| | Asserts whether a cell sequentially precedes or occupies the exact same coordinate as another.
|
| |
| bool | operator>= (const XLCellReference &lhs, const XLCellReference &rhs) noexcept |
| | Asserts whether a cell sequentially follows or occupies the exact same coordinate as another.
|
| |
◆ XLCellReference() [1/5]
| XLCellReference::XLCellReference |
( |
std::string_view |
cellAddress = "" | ) |
|
Constructor taking a cell address as argument.
- Parameters
-
| cellAddress | The address of the cell, e.g. 'A1'. |
Initializes a reference using an Excel-style coordinate string (e.g., 'A1'). Serves as the primary parser for cell identities read directly from the DOM.
Initializes a reference using an Excel-style coordinate string (e.g., 'A1'). Serves as the primary parser for cell identities read directly from the DOM.
◆ XLCellReference() [2/5]
| XLCellReference::XLCellReference |
( |
uint32_t |
row, |
|
|
uint16_t |
column |
|
) |
| |
Constructor taking the cell coordinates as arguments.
- Parameters
-
| row | The row number of the cell. |
| column | The column number of the cell. |
Directly binds explicit row and column indices. Offers higher performance than string parsing when iterating systematically (e.g., over a numerical range).
◆ XLCellReference() [3/5]
| XLCellReference::XLCellReference |
( |
uint32_t |
row, |
|
|
std::string_view |
column |
|
) |
| |
Constructor taking the row number and the column letter as arguments.
- Parameters
-
| row | The row number of the cell. |
| column | The column letter of the cell. |
Binds a hybrid coordinate system using explicit numeric rows and alphabetical column headers, typically for convenient manual cell selection.
◆ XLCellReference() [4/5]
Copy constructor.
- Parameters
-
| other | The object to be copied. |
◆ XLCellReference() [5/5]
◆ ~XLCellReference()
| XLCellReference::~XLCellReference |
( |
| ) |
|
|
default |
Destructor. Default implementation used.
◆ address()
| std::string XLCellReference::address |
( |
| ) |
const |
Get the address of the XLCellReference.
- Returns
- The address, e.g. 'A1'
Provides the cached Excel-style cell identifier (e.g. 'A1'), which is directly compliant with the OOXML <c r="A1"> coordinate schema requirement.
◆ column()
| uint16_t XLCellReference::column |
( |
| ) |
const |
|
noexcept |
Get the column number of the XLCellReference.
- Returns
- The column number.
Provides the raw integer index representing the 1-based horizontal position within the worksheet.
◆ columnAsNumber()
| uint16_t XLCellReference::columnAsNumber |
( |
std::string_view |
column | ) |
|
|
static |
Static helper function to convert column letter to column number (e.g. column 'A' becomes 1)
- Parameters
-
| column | The column letter, e.g. 'A' |
- Returns
- The column number.
Performs Base26 reverse-translation from alphabetical column notation into a numeric index. Throws XLInputError for non-alphabet characters or violations of maximum bounds.
◆ columnAsString()
| std::string XLCellReference::columnAsString |
( |
uint16_t |
column | ) |
|
|
static |
Static helper function to convert column number to column letter (e.g. column 1 becomes 'A')
- Parameters
-
- Returns
- The column letter
Translates a 1-based horizontal integer index into the standard Excel alphabetical column notation (A, B, ..., Z, AA, AB...). Required for generating compliant OOXML XML nodes.
◆ coordinatesFromAddress()
| XLCoordinates XLCellReference::coordinatesFromAddress |
( |
std::string_view |
address | ) |
|
|
static |
Static helper function to convert cell address to coordinates.
- Parameters
-
| address | The address to be converted, e.g. 'A1' |
- Returns
- A std::pair<row, column>
Splits a consolidated alphanumeric coordinate (e.g., 'A1') into discrete row and column components. Throws if the format is malformed or out of bounds.
◆ operator++() [1/2]
◆ operator++() [2/2]
◆ operator--() [1/2]
◆ operator--() [2/2]
◆ operator=() [1/2]
Assignment operator.
- Parameters
-
| other | The object to be copied/assigned. |
- Returns
- A reference to the new object.
◆ operator=() [2/2]
◆ row()
| uint32_t XLCellReference::row |
( |
| ) |
const |
|
noexcept |
Get the row number of the XLCellReference.
- Returns
- The row.
Provides the raw integer index representing the 1-based vertical position within the worksheet.
◆ rowAsNumber()
| uint32_t XLCellReference::rowAsNumber |
( |
std::string_view |
row | ) |
|
|
static |
- Parameters
-
- Returns
Fast integer parser specifically meant to process the numeric half of an Excel cell address.
◆ rowAsString()
| std::string XLCellReference::rowAsString |
( |
uint32_t |
row | ) |
|
|
static |
- Parameters
-
- Returns
Highly optimized formatter converting integer indices to strings (using std::to_chars if available) to minimize serialization overhead.
◆ setAddress()
| void XLCellReference::setAddress |
( |
std::string_view |
address | ) |
|
Set the address of the XLCellReference.
- Parameters
-
| address | The address, e.g. 'A1' |
- Precondition
- The address input string must be a valid Excel cell reference. Otherwise the behaviour is undefined.
Parses an Excel-style coordinate string (e.g., 'A1') and breaks it down into raw 1-based vertical and horizontal integer components for internal programmatic routing.
◆ setColumn()
| void XLCellReference::setColumn |
( |
uint16_t |
column | ) |
|
Set the column number of the XLCellReference.
- Parameters
-
Mutates the 1-based horizontal index. Validates the boundary and keeps the cached string address in sync.
◆ setRow()
| void XLCellReference::setRow |
( |
uint32_t |
row | ) |
|
Set the row number for the XLCellReference.
- Parameters
-
Mutates the 1-based vertical index. Automatically recalculates the full Excel-style string address to keep the internal state in sync.
◆ setRowAndColumn()
| void XLCellReference::setRowAndColumn |
( |
uint32_t |
row, |
|
|
uint16_t |
column |
|
) |
| |
Set both row and column number of the XLCellReference.
- Parameters
-
| row | The row number. |
| column | The column number. |
Re-binds the object to an entirely new coordinate, bypassing dual string recalculation by batching the integer mutations together.
◆ operator!=
Detects coordinate divergence, effectively identical to !(lhs == rhs).
◆ operator<
Evaluates precedence primarily by row, then by column, allowing cell ranges to be sorted efficiently and sequentially from left-to-right, top-to-bottom.
◆ operator<=
Asserts whether a cell sequentially precedes or occupies the exact same coordinate as another.
◆ operator==
Determines exact coordinate identity, allowing comparisons without resolving their DOM node equivalence.
◆ operator>
Inverts the less-than operator logic to verify strict left-to-right, top-to-bottom traversal dominance.
◆ operator>=
Asserts whether a cell sequentially follows or occupies the exact same coordinate as another.
The documentation for this class was generated from the following files: