import_reference_resolver

Defined in header: <orcus/spreadsheet/import_interface.hpp>

class import_reference_resolver

This is an interface to allow the implementor to provide its own reference address parsers, for both single cell references and cell range references. The implementor may choose to provide a different parser depending of the type of formula_ref_context_t argument given to the import_factory::get_reference_resolver() call.

Public Functions

virtual ~import_reference_resolver()
virtual src_address_t resolve_address(std::string_view address) = 0

Resolve a textural representation of a single cell address.

Parameters:

address – single cell address string.

Throws:

orcus::invalid_arg_error – the string is not a valid single cell addreess.

Returns:

structure containing the column and row positions of the address.

virtual src_range_t resolve_range(std::string_view range) = 0

Resolve a textural representation of a range address. Note that a string representing a valid single cell address should be considered a valid range address.

Parameters:

range – range address string.

Throws:

invalid_arg_error – the string is not a valid range addreess.

Returns:

structure containing the start and end positions of the range address.