20 #ifndef USERFUNCTION_H 21 #define USERFUNCTION_H 30 std::shared_ptr<Impl>
impl;
45 double operator()(
const std::vector<double>& p)
override;
52 std::string
description(
const std::string&)
override;
54 std::string
name()
const override;
65 extern UnitsExpressionWalker
timeUnit;
68 #include "userFunction.cd" 69 #include "userFunction.xcd"
std::vector< double > argVals
virtual void displayTooltip(cairo_t *, const std::string &) const
display tooltip text, eg on mouseover
void displayTooltip(cairo_t *cr, const std::string &tt) const override
display tooltip text, eg on mouseover
std::vector< std::string > argNames
double operator()(const std::vector< double > &p) override
evaluate function on arbitrary number of arguments (exprtk support)
void drawUserFunction(cairo_t *cairo) const
static UserFunction * create(OperationType::Type t)
void draw(cairo_t *cairo) const override
draw this item into a cairo context
Units units(bool check=false) const override
compute the dimensional units
base class for operations that have names
BoundingBox bb
canvas bounding box.
CLASSDESC_ACCESS(UserFunction)
void update(const Item &x)
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...
std::vector< std::string > symbolNames() const
represents the units (in sense of dimensional analysis) of a variable.
virtual std::string description() const
name of the associated data operation
double evaluate(double x, double y)
std::shared_ptr< Impl > impl
std::string name() const override
function name, shorn of argument decorators
UnitsExpressionWalker timeUnit
string to_string(CONST84 char *x)