Files
Upsilon/apps/shared/cache_context.h
Arthur Camouseigt c006ed7b10 [Sequence & Shared] Changed the location of various files
Moved sequences files to shared in order to allow the system to compile
without the app sequence.

Change-Id: Ia8349814a72776244acc41af964059f24e58cff0
2020-11-04 15:32:58 +01:00

28 lines
873 B
C++

#ifndef SEQUENCE_CACHE_CONTEXT_H
#define SEQUENCE_CACHE_CONTEXT_H
#include <poincare/context.h>
#include <poincare/expression.h>
#include <poincare/symbol.h>
#include "sequence_context.h"
namespace Shared {
template<typename T>
class CacheContext : public Poincare::ContextWithParent {
public:
CacheContext(Poincare::Context * parentContext);
const Poincare::Expression expressionForSymbolAbstract(const Poincare::SymbolAbstract & symbol, bool clone) override;
void setValueForSymbol(T value, const Poincare::Symbol & symbol);
void setSequenceContext(SequenceContext * sequenceContext) { m_sequenceContext = sequenceContext;}
private:
int nameIndexForSymbol(const Poincare::Symbol & symbol);
int rankIndexForSymbol(const Poincare::Symbol & symbol);
T m_values[MaxNumberOfSequences][MaxRecurrenceDepth];
SequenceContext * m_sequenceContext;
};
}
#endif