ixion::iface::
formula_model_access
¶Interface for allowing access to the model mostly from ixion’s formula interpreter and its related classes. The client code needs to provide concrete implementation of this interface in order to provide access to its content.
Subclassed by ixion::model_context
Public Functions
formula_model_access
()¶~formula_model_access
()¶get_config
() const = 0¶get_cell_listener_tracker
() = 0¶is_empty
(const abs_address_t &addr) const = 0¶get_celltype
(const abs_address_t &addr) const = 0¶get_numeric_value
(const abs_address_t &addr) const = 0¶Get a numeric representation of the cell value at specified position. If the cell at the specified position is a formula cell and its result has not yet been computed, it will block until the result becomes available. Call this only during formula (re-)calculation.
addr
: position of the cell.get_string_identifier
(const abs_address_t &addr) const = 0¶get_string_identifier
(const char *p, size_t n) const = 0¶get_formula_cell
(const abs_address_t &addr) const = 0¶get_formula_cell
(const abs_address_t &addr) = 0¶get_named_expression
(const std::string &name) const = 0¶get_named_expression_name
(const formula_cell *expr) const = 0¶count_range
(const abs_range_t &range, const values_t &values_type) const = 0¶get_range_value
(const abs_range_t &range) const = 0¶Obtain range value in matrix form. Multi-sheet ranges are not supported. If the specified range consists of multiple sheets, it throws an exception.
range
: absolute, single-sheet range address. Multi-sheet ranges are not allowed.create_session_handler
()¶Session handler instance receives various events from the formula interpretation run, in order to respond to those events. This is optional; the model context implementation is not required to provide a handler.
get_table_handler
()¶Table interface provides access to all table ranges stored in the document model. A table is a 2-dimensional range of cells that include named columns. It is used when resolving a table reference that refers to a cell or a range of cells by the table name and/or column name.
get_table_handler
() const¶append_string
(const char *p, size_t n) = 0¶add_string
(const char *p, size_t n) = 0¶get_string
(string_id_t identifier) const = 0¶ixion::iface::
session_handler
¶Public Functions
~session_handler
()¶begin_cell_interpret
(const abs_address_t &pos) = 0¶end_cell_interpret
() = 0¶set_result
(const formula_result &result) = 0¶set_invalid_expression
(const char *msg) = 0¶set_formula_error
(const char *msg) = 0¶push_token
(fopcode_t fop) = 0¶push_value
(double val) = 0¶push_string
(size_t sid) = 0¶push_single_ref
(const address_t &addr, const abs_address_t &pos) = 0¶push_range_ref
(const range_t &range, const abs_address_t &pos) = 0¶push_table_ref
(const table_t &table) = 0¶push_function
(formula_function_t foc) = 0¶ixion::iface::
table_handler
¶Public Functions
~table_handler
()¶get_range
(const abs_address_t &pos, string_id_t column_first, string_id_t column_last, table_areas_t areas) const = 0¶Get the data range associated with a given column name. The current position is used to infer which table to use.
pos
: current cell position. column_first
: name of the starting column within the table. column_last
: name of the ending column within the table, or empty_string_id if it’s a single column. areas
: area specifiter value, which may consist of one or more values of table_area_t.get_range
(string_id_t table, string_id_t column_first, string_id_t column_last, table_areas_t areas) const = 0¶Get the data range associated with given table and column names.
table
: string identifier representing the table name. column_first
: name of the starting column within the table. column_last
: name of the ending column within the table, or empty_string_id if it’s a single column. areas
: area specifiter value, which may consist of one or more values of table_area_t.