1 #ifndef SHARED_FUNCTION_H 2 #define SHARED_FUNCTION_H 19 const char *
text()
const;
20 const char *
name()
const;
31 return templatedApproximateAtAbscissa(x, context);
34 return templatedApproximateAtAbscissa(x, context);
40 static_assert((k_dataLengthInBytes & 0x3) == 0,
"The function data size is not a multiple of 4 bytes (cannot compute crc)");
41 template<
typename T>
T templatedApproximateAtAbscissa(
T x,
Poincare::Context * context)
const;
42 virtual char symbol()
const = 0;
virtual void setContent(const char *c)
void setColor(KDColor m_color)
static constexpr int maxBufferSize()
const char * text() const
virtual double sumBetweenBounds(double start, double end, Poincare::Context *context) const =0
virtual double evaluateAtAbscissa(double x, Poincare::Context *context) const
Poincare::Expression * expression(Poincare::Context *context) const
void setActive(bool active)
virtual uint32_t checksum()
const char * name() const
constexpr KDColor KDColorBlack
Poincare::ExpressionLayout * layout()
Function(const char *name=nullptr, KDColor color=KDColorBlack)
virtual float evaluateAtAbscissa(float x, Poincare::Context *context) const
Function & operator=(const Function &other)