Formula Cell

class

Public Functions

ixion::formula_cell::formula_cell(const formula_cell&)
formula_cell &ixion::formula_cell::operator=(formula_cell)
ixion::formula_cell::formula_cell()
ixion::formula_cell::formula_cell(size_t tokens_identifier)
ixion::formula_cell::~formula_cell()
size_t ixion::formula_cell::get_identifier() const
void ixion::formula_cell::set_identifier(size_t identifier)
double ixion::formula_cell::get_value() const
double ixion::formula_cell::get_value_nowait() const
void ixion::formula_cell::interpret(iface::formula_model_access &context, const abs_address_t &pos)
void ixion::formula_cell::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.

void ixion::formula_cell::reset()

Reset cell’s internal state.

std::vector<const formula_token *> ixion::formula_cell::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.

Return
an array of reference formula tokens. Each element is a pointer to the actual token instance stored in the cell object. Be aware that the pointer is valid only as long as the actual token instance is alive.
Parameters
  • cxt: model context instance.
  • pos: position of the cell.

const formula_result &ixion::formula_cell::get_result_cache() const
const formula_result *ixion::formula_cell::get_result_cache_nowait() const
bool ixion::formula_cell::is_shared() const
void ixion::formula_cell::set_shared(bool b)
class

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 Types

enum type ixion::formula_result::result_type

Values:

Public Functions

ixion::formula_result::formula_result()
ixion::formula_result::formula_result(const formula_result &r)
ixion::formula_result::formula_result(double v)
ixion::formula_result::formula_result(string_id_t strid)
ixion::formula_result::formula_result(formula_error_t e)
ixion::formula_result::~formula_result()
void ixion::formula_result::reset()
void ixion::formula_result::set_value(double v)
void ixion::formula_result::set_string(string_id_t strid)
void ixion::formula_result::set_error(formula_error_t e)
double ixion::formula_result::get_value() const

Get a numeric result value. The caller must make sure the result is of numeric type, else the behavior is undefined.

Return
numeric result value.

string_id_t ixion::formula_result::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.

Return
string ID.

formula_error_t ixion::formula_result::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.

Return
enum value representing the error.
See
ixion::get_formula_error_name

result_type ixion::formula_result::get_type() const

Get the type of result.

Return
enum value representing the result type.

std::string ixion::formula_result::str(const iface::formula_model_access &cxt) const

Get a string representation of the result value no matter what the result type is.

Return
string representation of the result value.
Parameters
  • cxt: model context object.

void ixion::formula_result::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.

formula_result &ixion::formula_result::operator=(const formula_result &r)
bool ixion::formula_result::operator==(const formula_result &r) const
bool ixion::formula_result::operator!=(const formula_result &r) const