formula_cell
¶Public Functions
formula_cell
(const formula_cell&)¶operator=
(formula_cell)¶formula_cell
()¶formula_cell
(const formula_tokens_store_ptr_t &tokens)¶formula_cell
(row_t group_row, col_t group_col, const calc_status_ptr_t &cs, const formula_tokens_store_ptr_t &tokens)¶~formula_cell
()¶get_tokens
() const¶set_tokens
(const formula_tokens_store_ptr_t &tokens)¶get_value
() const¶get_value_nowait
() const¶interpret
(iface::formula_model_access &context, const abs_address_t &pos)¶check_circular
(const iface::formula_model_access &cxt, const abs_address_t &pos)¶Determine if this cell contains circular reference by walking through all its reference tokens.
reset
()¶Reset cell’s internal state.
get_ref_tokens
(const iface::formula_model_access &cxt, const abs_address_t &pos) const¶Get a series of all reference tokens included in the formula expression stored in this cell.
cxt
: model context instance. pos
: position of the cell.get_raw_result_cache
() const¶get_raw_result_cache_nowait
() const¶get_result_cache
() const¶Get the cached result as a single cell. For a non-grouped formula cell, it should be identical to the value from the get_result_cache call. For a grouped formula cell, you’ll get a single value assigned to the position of the cell in case the original result is a matrix value.
get_result_cache_nowait
() const¶get_group_properties
() const¶get_parent_position
(const abs_address_t &pos) const¶Get the absolute parent position of a grouped formula cell. If the cell is not grouped, it simply returns the original position passed to this method.
pos
: original position from which to calculate the parent position.formula_result
¶Store formula result which may be either numeric, textural, or error. In case the result is textural, it owns the instance of the string.
Public Functions
formula_result
()¶formula_result
(const formula_result &r)¶formula_result
(formula_result &&r)¶formula_result
(double v)¶formula_result
(string_id_t strid)¶formula_result
(formula_error_t e)¶~formula_result
()¶reset
()¶set_value
(double v)¶set_string
(string_id_t strid)¶set_error
(formula_error_t e)¶get_value
() const¶Get a numeric result value. The caller must make sure the result is of numeric type, else the behavior is undefined.
get_string
() const¶Get a string ID for textural result value. The caller must make sure the result is of textural type, else the behavior is undefined.
get_error
() const¶Get an error value of the result. The caller must make sure that the result is of error type, else the behavior is undefined.
get_matrix
() const¶Get a matrix value of the result. The caller must make sure that the result is of matrix type, else the behavior is undefined.
get_type
() const¶Get the type of result.
str
(const iface::formula_model_access &cxt) const¶Get a string representation of the result value no matter what the result type is.
cxt
: model context object.parse
(iface::formula_model_access &cxt, const char *p, size_t n)¶Parse a textural representation of a formula result, and set result value of appropriate type.
operator=
(formula_result r)¶operator==
(const formula_result &r) const¶operator!=
(const formula_result &r) const¶