mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
28 lines
606 B
C++
28 lines
606 B
C++
#ifndef CALCULATION_CALCULATION_STORE_H
|
|
#define CALCULATION_CALCULATION_STORE_H
|
|
|
|
#include "calculation.h"
|
|
|
|
namespace Calculation {
|
|
|
|
// TODO: make tests for the ring buffer
|
|
|
|
class CalculationStore {
|
|
public:
|
|
CalculationStore();
|
|
Calculation * calculationAtIndex(int i);
|
|
Calculation * push(const char * text, Poincare::Context * context);
|
|
void deleteCalculationAtIndex(int i);
|
|
void deleteAll();
|
|
int numberOfCalculations();
|
|
void tidy();
|
|
private:
|
|
static constexpr int k_maxNumberOfCalculations = 10;
|
|
Calculation * m_start;
|
|
Calculation m_calculations[k_maxNumberOfCalculations];
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|