Types

Macros

IXION_ASCII(literal)

Use this macro with a literal string and it returns the literal string followed by its length.

Primitive Types

enum class ixion::celltype_t : uint8_t

This type represents a raw cell type as stored in ixion::model_context.

Values:

enumerator unknown

unknown cell type.

enumerator string

cell contains a raw string value.

enumerator numeric

cell contains a raw numeric value.

enumerator formula

cell contains a formula object.

enumerator boolean

cell contains a raw boolean value.

enumerator empty

cell is empty and contains absolutely nothing.

enum class ixion::cell_value_t : uint8_t

Similar to celltype_t, except that it does not include a formula type. Instead it uses the formula result type to classify its type. The error type refers to an error value in formula cell.

Values:

enumerator unknown

unknown cell value type.

enumerator string

either the cell contains a raw string value, or a calculated formula cell whose result is of string type.

enumerator numeric

either the cell contains a raw numeric value, or a calculated formula cell whose result is of numeric type.

enumerator error

this type corresponds with a formula cell whose result contains an error.

enumerator boolean

either the cell contains a raw boolean value type, or a calculated formula cell whose result is of boolean type.

enumerator empty

the cell is empty and contains nothing whatsoever.

enum ixion::value_t

Values:

enumerator value_none
enumerator value_string
enumerator value_numeric
enumerator value_boolean
enumerator value_empty
enum ixion::table_area_t

Value that specifies the area inside a table.

Values:

enumerator table_area_none
enumerator table_area_data
enumerator table_area_headers
enumerator table_area_totals
enumerator table_area_all
enum class ixion::formula_name_resolver_t

Formula name resolver type specifies how name tokens are resolved.

Values:

enumerator unknown

Unknown syntax.

enumerator excel_a1

Default A1 syntax used in Excel

enumerator excel_r1c1

R1C1 syntax available in Excel

enumerator calc_a1

Default A1 syntax used in Calc

enumerator odff

OpenFormula syntax

enumerator odf_cra

ODF cell-range-address syntax

enum class ixion::formula_error_t : uint8_t

Formula error types. Note that only the official (i.e. non-internal) error types have their corresponding error strings. Use the get_formula_error_name() function to convert an enum member value of this type to its string representation.

Values:

enumerator no_error
enumerator ref_result_not_available
enumerator division_by_zero
enumerator invalid_expression
enumerator name_not_found
enumerator no_range_intersection
enumerator invalid_value_type
enumerator no_value_available
enumerator no_result_error
enumerator stack_error
enumerator general_error
enum class ixion::formula_result_wait_policy_t

Type of policy on what to do when querying for the result of a formula cell whose result has not yet been calculated.

Values:

enumerator block_until_done

Querying for the result of a formula cell will block until the calculation is complete.

enumerator throw_exception

Querying for the result of a formula cell that has not yet been calculated will throw an exception.

enum class ixion::formula_event_t

Formula event type used for event notification during calculation of formula cells.

Values:

enumerator calculation_begins

Start of the calculations of formula cells.

enumerator calculation_ends

End of the calculations of formula cells.

enum class ixion::rc_direction_t

Specifies iterator direction of a ixion::model_context.

Values:

enumerator horizontal

Flows left to right first then top to bottom.

enumerator vertical

Flows top to bottom first then left to right.

using ixion::col_t = int32_t

Column index type.

using ixion::row_t = int32_t

Row index type.

using ixion::sheet_t = int32_t

Sheet index type.

using ixion::rc_t = row_t

Integer type that is large enough to store either a row or a column index.

using ixion::string_id_t = uint32_t

String ID type.

All string values are converted into integer tokens. You need to call the get_string() method of ixion::model_context to get the actual string value.

using ixion::table_areas_t = int32_t

type that stores a mixture of ixion::table_area_t values.

using ixion::formula_tokens_t = std::vector<formula_token>
const string_id_t ixion::empty_string_id

Global string ID representing an empty string.

const sheet_t ixion::global_scope

Special sheet ID that represents a global scope, as opposed to a sheet-local scope.

const sheet_t ixion::invalid_sheet

Special sheet ID that represents an invalid sheet.

struct rc_size_t

This structure stores a 2-dimensional size information.

Public Functions

rc_size_t()
rc_size_t(const rc_size_t &other)
rc_size_t(row_t _row, col_t _column)
~rc_size_t()
rc_size_t &operator=(const rc_size_t &other)

Public Members

row_t row
col_t column
struct formula_group_t

This strcuture stores information about grouped formula cells. All formula cells belonging to the same group shares the same set of values.

Public Functions

formula_group_t()
formula_group_t(const formula_group_t &r)
formula_group_t(const rc_size_t &_group_size, uintptr_t _identity, bool _grouped)
~formula_group_t()
formula_group_t &operator=(const formula_group_t &other)

Public Members

rc_size_t size

Size of the formula group.

uintptr_t identity

Unique value identifying the group a cell belongs to. Cells belonging to the same formula group should have the same value.

bool grouped

Boolean value indicating whether or not a cell is grouped.

Cell Addresses

struct address_t

Stores either absolute or relative address.

Public Functions

address_t()
address_t(sheet_t _sheet, row_t _row, col_t _column, bool _abs_sheet = true, bool _abs_row = true, bool _abs_column = true)
address_t(const address_t &r)
address_t(const abs_address_t &r)
bool valid() const
abs_address_t to_abs(const abs_address_t &origin) const
::std::string get_name() const
void set_absolute(bool abs)

Public Members

sheet_t sheet
row_t row
col_t column
bool abs_sheet
bool abs_row
bool abs_column
struct hash

Public Functions

size_t operator()(const address_t &addr) const
struct rc_address_t

Stores either absolute or relative address, but unlike the address_t counterpart, this struct only stores row and column positions.

Public Functions

rc_address_t()
rc_address_t(row_t _row, col_t _column, bool _abs_row = true, bool _abs_column = true)
rc_address_t(const rc_address_t &r)

Public Members

row_t row
col_t column
bool abs_row
bool abs_column
struct hash

Public Functions

size_t operator()(const rc_address_t &addr) const
struct abs_address_t

Stores absolute address, and absolute address only.

Public Types

enum init_invalid

Values:

enumerator invalid

Public Functions

abs_address_t()
abs_address_t(init_invalid)
abs_address_t(sheet_t _sheet, row_t _row, col_t _column)
abs_address_t(const abs_address_t &r)
bool valid() const
::std::string get_name() const

Public Members

sheet_t sheet
row_t row
col_t column
struct hash

Public Functions

size_t operator()(const abs_address_t &addr) const
struct abs_rc_address_t

Public Types

enum init_invalid

Values:

enumerator invalid

Public Functions

abs_rc_address_t()
abs_rc_address_t(init_invalid)
abs_rc_address_t(row_t _row, col_t _column)
abs_rc_address_t(const abs_rc_address_t &r)
abs_rc_address_t(const abs_address_t &r)
bool valid() const

Public Members

row_t row
col_t column
struct hash

Public Functions

size_t operator()(const abs_rc_address_t &addr) const
struct range_t

Stores range whose component may be relative or absolute.

Public Functions

range_t()
range_t(const address_t &_first, const address_t &_last)
range_t(const range_t &r)
range_t(const abs_range_t &r)
bool valid() const
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
void set_absolute(bool abs)

Public Members

address_t first
address_t last
struct hash

Public Functions

size_t operator()(const range_t &range) const
struct abs_range_t

Stores absolute range address.

Public Types

enum init_invalid

Values:

enumerator invalid

Public Functions

abs_range_t()
abs_range_t(init_invalid)
abs_range_t(sheet_t _sheet, row_t _row, col_t _col)
abs_range_t(sheet_t _sheet, row_t _row, col_t _col, row_t _row_span, col_t _col_span)
Parameters:
  • _sheet – 0-based sheet index.

  • _row – 0-based row position of the top-left cell of the range.

  • _col – 0-based column position of the top-left cell of the range.

  • _row_span – row length of the range. It must be 1 or greater.

  • _col_span – column length of the range. It must be 1 or greater.

abs_range_t(const abs_address_t &addr)
abs_range_t(const abs_address_t &addr, row_t row_span, col_t col_span)
bool valid() const
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.

bool contains(const abs_address_t &addr) const

Check whether or not a given address is contained within this range.

void reorder()

Reorder range values as needed to ensure the range is valid.

Public Members

abs_address_t first
abs_address_t last
struct hash

Public Functions

size_t operator()(const abs_range_t &range) const
struct abs_rc_range_t

Public Types

enum init_invalid

Values:

enumerator invalid

Public Functions

abs_rc_range_t()
abs_rc_range_t(init_invalid)
abs_rc_range_t(const abs_rc_range_t &other)
abs_rc_range_t(const abs_range_t &other)
bool valid() const
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.

bool contains(const abs_rc_address_t &addr) const

Check whether or not a given address is contained within this range.

Public Members

abs_rc_address_t first
abs_rc_address_t last
struct hash

Public Functions

size_t operator()(const abs_rc_range_t &range) const
struct table_t

Public Functions

table_t()
bool operator==(const table_t &r) const
bool operator!=(const table_t &r) const

Public Members

string_id_t name
string_id_t column_first
string_id_t column_last
table_areas_t areas
using ixion::abs_address_set_t = std::unordered_set<abs_address_t, abs_address_t::hash>

Type that represents a collection of multiple absolute cell addresses.

using ixion::abs_range_set_t = std::unordered_set<abs_range_t, abs_range_t::hash>
using ixion::abs_rc_range_set_t = std::unordered_set<abs_rc_range_t, abs_rc_range_t::hash>

Column Blocks

using ixion::column_block_handle = void*
using ixion::column_block_callback_t = std::function<bool(col_t, row_t, row_t, const column_block_shape_t&)>

Callback function type to be used during traversal of column data.

enum class ixion::column_block_t : int

Type of a column block that stores a series of adjacent cell values of the same type.

Values:

enumerator unknown
enumerator empty
enumerator boolean
enumerator numeric
enumerator string
enumerator formula
struct column_block_shape_t

Data that represents the shape of a column block.

Public Functions

column_block_shape_t()
column_block_shape_t(std::size_t _position, std::size_t _size, std::size_t _offset, column_block_t _type, column_block_handle _data)
column_block_shape_t(const column_block_shape_t &other)
column_block_shape_t &operator=(const column_block_shape_t &other)

Public Members

std::size_t position
std::size_t size
std::size_t offset
column_block_t type
column_block_handle data

Utility Functions

std::string_view ixion::get_formula_error_name(formula_error_t fe)

Get a string representation of a formula error type.

Parameters:

fe – enum value representing a formula error type.

Returns:

null-terminated string representation of the formula error type.

formula_error_t ixion::to_formula_error_type(std::string_view s)

Parse a formula error string and convert it to a corresponding enum value.

Parameters:

s – string representation of a formula error type.

Returns:

enum value for a formula error type.