Files
Upsilon/apps/sequence/sequence_store.h
Émilie Feral 08a663a64f [apps/sequence] Do no add a new function as long as the user did not
choose a type

Change-Id: I67c3172b416d7d80a3bd9a4eb18091ab72626e4b
2017-02-16 14:46:04 +01:00

36 lines
1.0 KiB
C++

#ifndef SEQUENCE_SEQUENCE_STORE_H
#define SEQUENCE_SEQUENCE_STORE_H
#include "sequence.h"
#include "../shared/function_store.h"
#include <stdint.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;
static constexpr int k_maxNumberOfSequences = 3;
private:
const KDColor firstAvailableColor() override;
static constexpr KDColor k_defaultColors[k_maxNumberOfSequences] = {
KDColor::RGB24(0xbe2727), KDColor::RGB24(0x3e6f3c), KDColor::RGB24(0x656975)
};
static constexpr const char * k_sequenceNames[k_maxNumberOfSequences] = {
"u", "v", "w"
};
Sequence m_sequences[k_maxNumberOfSequences];
};
}
#endif