Files
Upsilon/apps/sequence/sequence_store.h
Émilie Feral b9183eb84d [apps/graph][apps/sequence] In function store model, specify the
implementation of removeAll (always let an empty function in cartesian
functions)

Change-Id: I5e91a0ea427ba823eee4f86cdd8b7cd5426df2c6
2017-04-10 10:52:22 +02:00

39 lines
1.1 KiB
C++

#ifndef SEQUENCE_SEQUENCE_STORE_H
#define SEQUENCE_SEQUENCE_STORE_H
#include "sequence.h"
#include "../shared/function_store.h"
#include <stdint.h>
#include <escher.h>
namespace Sequence {
class SequenceStore : public Shared::FunctionStore {
public:
using Shared::FunctionStore::FunctionStore;
uint32_t storeChecksum() override;
Sequence * functionAtIndex(int i) override;
Sequence * activeFunctionAtIndex(int i) override;
Sequence * definedFunctionAtIndex(int i) override;
Sequence * addEmptyFunction() override;
void removeFunction(Shared::Function * f) override;
int maxNumberOfFunctions() override;
const char * firstAvailableName() override;
char symbol() const override;
void removeAll() override;
static constexpr int k_maxNumberOfSequences = 3;
private:
const KDColor firstAvailableColor() override;
static constexpr KDColor k_defaultColors[k_maxNumberOfSequences] = {
Palette::Red, Palette::Blue, Palette::YellowDark
};
static constexpr const char * k_sequenceNames[k_maxNumberOfSequences] = {
"u", "v", "w"
};
Sequence m_sequences[k_maxNumberOfSequences];
};
}
#endif