Blame view

emulateur/epsilon-nofrendo/apps/shared/store_context.h 856 Bytes
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
30
31
  #ifndef SHARED_STORE_CONTEXT_H
  #define SHARED_STORE_CONTEXT_H
  
  #include <poincare.h>
  #include "double_pair_store.h"
  #include <cmath>
  
  namespace Shared {
  
  class StoreContext : public Poincare::Context {
  public:
    StoreContext(Shared::DoublePairStore * store) :
      Poincare::Context(),
      m_store(store),
      m_seriesPairIndex(-1),
      m_parentContext(nullptr),
      m_value(NAN)
    {}
    void setParentContext(Poincare::Context * parentContext) { m_parentContext = parentContext; }
    void setSeriesPairIndex(int j) { m_seriesPairIndex = j; }
    void setExpressionForSymbolName(const Poincare::Expression * expression, const Poincare::Symbol * symbol, Poincare::Context & context) override;
  protected:
    Shared::DoublePairStore * m_store;
    int m_seriesPairIndex;
    Poincare::Context * m_parentContext;
    Poincare::Approximation<double> m_value;
  };
  
  }
  
  #endif