[apps] Apps can be picked and ordered at compile-time

This commit is contained in:
Romain Goyet
2017-09-14 12:25:18 +02:00
committed by EmilieNumworks
parent 173c0249a2
commit dcdd27d6bf
11 changed files with 67 additions and 42 deletions

View File

@@ -2,14 +2,10 @@
#define APPS_CONTAINER_STORAGE_H
#include "apps_container.h"
#include "graph/app.h"
#include "probability/app.h"
#include "calculation/app.h"
#include "regression/app.h"
#include "sequence/app.h"
#include "settings/app.h"
#include "statistics/app.h"
#include "code/app.h"
#ifndef APPS_CONTAINER_SNAPSHOT_DECLARATIONS
#error Missing snapshot declarations
#endif
class AppsContainerStorage : public AppsContainer {
public:
@@ -17,16 +13,7 @@ public:
int numberOfApps() override;
App::Snapshot * appSnapshotAtIndex(int index) override;
private:
static constexpr int k_numberOfCommonApps = 9;
static constexpr int k_totalNumberOfApps = 2+k_numberOfCommonApps;
Calculation::App::Snapshot m_calculationSnapshot;
Graph::App::Snapshot m_graphSnapshot;
Sequence::App::Snapshot m_sequenceSnapshot;
Settings::App::Snapshot m_settingsSnapshot;
Statistics::App::Snapshot m_statisticsSnapshot;
Probability::App::Snapshot m_probabilitySnapshot;
Regression::App::Snapshot m_regressionSnapshot;
Code::App::Snapshot m_codeSnapshot;
APPS_CONTAINER_SNAPSHOT_DECLARATIONS
};
#endif