Numworks Epsilon  1.4.1
Graphing Calculator Operating System
variable_context.h
Go to the documentation of this file.
1 #ifndef POINCARE_VARIABLE_CONTEXT_H
2 #define POINCARE_VARIABLE_CONTEXT_H
3 
4 #include <poincare/context.h>
5 #include <poincare/complex.h>
6 
7 namespace Poincare {
8 
9 template<typename T>
10 class VariableContext : public Context {
11 public:
12  VariableContext(char name, Context * parentContext = nullptr);
13  void setExpressionForSymbolName(const Expression * expression, const Symbol * symbol, Context & context) override;
14  const Expression * expressionForSymbol(const Symbol * symbol) override;
15 private:
16  char m_name;
17  Complex<T> m_value;
18  Context * m_parentContext;
19 };
20 
21 }
22 
23 #endif
const Expression * expressionForSymbol(const Symbol *symbol) override
void setExpressionForSymbolName(const Expression *expression, const Symbol *symbol, Context &context) override
VariableContext(char name, Context *parentContext=nullptr)