mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[apps/shared] Add method in shared function store
Change-Id: I1b15ed95e7e9a5c4cffe303e5f699ec03ad87b45
This commit is contained in:
@@ -60,6 +60,10 @@ void FunctionStore::removeFunction(Shared::Function * f) {
|
||||
}
|
||||
}
|
||||
|
||||
int FunctionStore::maxNumberOfFunctions() {
|
||||
return k_maxNumberOfFunctions;
|
||||
}
|
||||
|
||||
const char * FunctionStore::firstAvailableName() {
|
||||
for (int k = 0; k < k_maxNumberOfFunctions; k++) {
|
||||
int j = 0;
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
Function * definedFunctionAtIndex(int i) override;
|
||||
Function * addEmptyFunction() override;
|
||||
void removeFunction(Shared::Function * f) override;
|
||||
int maxNumberOfFunctions() override;
|
||||
static constexpr int k_maxNumberOfFunctions = 8;
|
||||
private:
|
||||
const char * firstAvailableName() override;
|
||||
|
||||
@@ -52,6 +52,10 @@ void SequenceStore::removeFunction(Shared::Function * f) {
|
||||
}
|
||||
}
|
||||
|
||||
int SequenceStore::maxNumberOfFunctions() {
|
||||
return k_maxNumberOfSequences;
|
||||
}
|
||||
|
||||
const char * SequenceStore::firstAvailableName() {
|
||||
for (int k = 0; k < k_maxNumberOfSequences; k++) {
|
||||
int j = 0;
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
Sequence * definedFunctionAtIndex(int i) override;
|
||||
Sequence * addEmptyFunction() override;
|
||||
void removeFunction(Shared::Function * f) override;
|
||||
int maxNumberOfFunctions() override;
|
||||
static constexpr int k_maxNumberOfSequences = 3;
|
||||
private:
|
||||
const char * firstAvailableName() override;
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
int numberOfDefinedFunctions();
|
||||
// An active function must be defined to be counted
|
||||
int numberOfActiveFunctions();
|
||||
virtual int maxNumberOfFunctions() = 0;
|
||||
protected:
|
||||
int m_numberOfFunctions;
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user