Files
Upsilon/apps/sequence/cache_context.h
Lionel Debroux 1a8c6b6ae9 [poincare, escher, ion, apps] Split the huge umbrella header poincare.h, to reduce build time.
This should be a NFC, but surprisingly, it also reduces size... so what does it change ?
2018-10-23 11:49:09 +02:00

27 lines
747 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 <poincare/variable_context.h>
#include "sequence_context.h"
namespace Sequence {
template<typename T>
class CacheContext : public Poincare::VariableContext<T> {
public:
CacheContext(Poincare::Context * parentContext);
const Poincare::Expression expressionForSymbol(const Poincare::Symbol & symbol) override;
void setValueForSymbol(T value, const Poincare::Symbol & symbol);
private:
int nameIndexForSymbol(const Poincare::Symbol & symbol);
int rankIndexForSymbol(const Poincare::Symbol & symbol);
T m_values[MaxNumberOfSequences][MaxRecurrenceDepth];
};
}
#endif