7#include "formula_node.hpp"
8#include "../macros.hpp"
10hi_export_module(hikogui.formula.formula_name_node);
12namespace hi {
inline namespace v1 {
16 mutable formula_post_process_context::function_type function;
22 function =
context.get_function(name);
24 throw parse_error(std::format(
"{}:{}: Could not find function {}().", line_nr, column_nr, name));
35 throw operation_error(std::format(
"{}:{}: Can not evaluate function.\n{}", line_nr, column_nr, e.
what()));
44 throw operation_error(std::format(
"{}:{}: Can not evaluate function.\n{}", line_nr, column_nr, e.
what()));
48 bool has_evaluate_xvalue()
const override
60 throw operation_error(std::format(
"{}:{}: Can not evaluate function.\n{}", line_nr, column_nr, e.
what()));
69 throw operation_error(std::format(
"{}:{}: Can not evaluate function.\n{}", line_nr, column_nr, e.
what()));
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
A dynamic data type.
Definition datum.hpp:212
friend constexpr T const & get(datum const &rhs) noexcept
Get the value of a datum.
Definition datum.hpp:1752
Definition formula_evaluation_context.hpp:18
Definition formula_name_node.hpp:14
datum evaluate(formula_evaluation_context &context) const override
Evaluate an rvalue.
Definition formula_name_node.hpp:28
datum & assign(formula_evaluation_context &context, datum const &rhs) const override
Assign to a non-existing or existing lvalue.
Definition formula_name_node.hpp:64
datum & evaluate_lvalue(formula_evaluation_context &context) const override
Evaluate an existing lvalue.
Definition formula_name_node.hpp:39
datum const & evaluate_xvalue(formula_evaluation_context const &context) const override
Evaluate an existing xvalue.
Definition formula_name_node.hpp:55
datum call(formula_evaluation_context &context, datum::vector_type const &arguments) const override
Call a function with a datum::vector as arguments.
Definition formula_name_node.hpp:73
void resolve_function_pointer(formula_post_process_context &context) override
Resolve function and method pointers.
Definition formula_name_node.hpp:20
std::string get_name() const noexcept override
Get the name of a formula_name_node.
Definition formula_name_node.hpp:78
Definition formula_node.hpp:21
Definition formula_post_process_context.hpp:237
Exception thrown during parsing on an error.
Definition exception_intf.hpp:47
Exception thrown during execution of a dynamic operation.
Definition exception_intf.hpp:160