formula_name_t
Defined in header: <ixion/formula_name_resolver.hpp>
-
struct formula_name_t
Structure that represents the type of a ‘name’ in a formula expression.
A name can be either one of:
cell reference
range reference
table reference
named expression
function
Public Types
-
enum name_type
Kind of name.
Values:
-
enumerator invalid
The string is not a valid name of any kind.
-
enumerator cell_reference
Reference to a single cell.
-
enumerator range_reference
Reference to a range of cells.
-
enumerator table_reference
Reference to a table or a part of one.
-
enumerator named_expression
Named expression.
-
enumerator function
Built-in function.
-
enumerator invalid
-
using value_type = std::variant<address_t, range_t, table_type, formula_function_t>
Type of the resolved value: an address for a cell reference, a range for a range reference, a table_type for a table reference, or a function opcode for a function. A named expression has no value.
Public Functions
-
formula_name_t()
-
std::string to_string() const
Return a string that represents the data stored internally. Useful for debugging.
Public Members
-
value_type value
Resolved value, whose alternative depends on the kind of name.
-
struct table_type
Table information for a table reference name. Unlike the ixion::table_ref_t counterpart, we store strings as string views as the resolver doesn’t have access to the string pool.
Public Members
-
std::string_view name
Name of the table, or empty when the reference does not name it.
-
std::string_view column_first
Name of the first column, or empty for an area-only reference.
-
std::string_view column_last
Name of the last column, or empty for a single-column reference.
-
table_areas_t areas
Areas covered, as a combination of table_area_t flags.
-
std::string_view name