Blame view

Modif/epsilon-master/poincare/include/poincare/empty_expression.h 1.13 KB
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  #ifndef POINCARE_EMPTY_EXPRESSION_H
  #define POINCARE_EMPTY_EXPRESSION_H
  
  #include <poincare/static_hierarchy.h>
  #include <poincare/evaluation.h>
  
  namespace Poincare {
  
  /* An empty expression awaits completion by the user. */
  
  class EmptyExpression : public StaticHierarchy<0> {
  public:
    Type type() const override {
      return Type::EmptyExpression;
    }
    Expression * clone() const override;
    int writeTextInBuffer(char * buffer, int bufferSize, PrintFloat::Mode floatDisplayMode, int numberOfSignificantDigits) const override;
  private:
    /* Layout */
    ExpressionLayout * createLayout(PrintFloat::Mode floatDisplayMode, int numberOfSignificantDigits) const override;
    /* Evaluation */
    Evaluation<float> * privateApproximate(SinglePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedApproximate<float>(context, angleUnit); }
    Evaluation<double> * privateApproximate(DoublePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedApproximate<double>(context, angleUnit); }
    template<typename T> Complex<T> * templatedApproximate(Context& context, AngleUnit angleUnit) const;
  };
  
  }
  
  #endif