Files
Upsilon/apps/graph/function_store.h
Émilie Feral 82ea774621 [apps/graph] implement add and remove functions in function store
Change-Id: Iabbe9a83f575a81081999d65e6faedbc05476626
2016-09-26 09:39:46 +02:00

31 lines
653 B
C++

#ifndef GRAPH_FUNCTION_STORE_H
#define GRAPH_FUNCTION_STORE_H
#include "function.h"
namespace Graph {
class FunctionStore {
public:
FunctionStore();
Function * functionAtIndex(int i);
void addFunction(Function * f);
void removeFunction(Function * f);
void pushFunction(const char * functionText);
int numberOfFunctions();
constexpr static int numberOfDefaultColors = 3;
constexpr static KDColor defaultColors[numberOfDefaultColors] = {
KDColorRed, KDColorGreen, KDColorBlue
};
private:
int m_numberOfFunctions;
static constexpr int k_maxNumberOfFunctions = 8;
Function m_functions[k_maxNumberOfFunctions];
};
}
#endif