Initial commit
This commit is contained in:
Executable
+44
@@ -0,0 +1,44 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <functional>
|
||||
|
||||
namespace wfr {
|
||||
namespace scheduling {
|
||||
|
||||
class AbstractScheduler;
|
||||
|
||||
class SchedulerManager {
|
||||
private:
|
||||
static SchedulerManager* singleton;
|
||||
|
||||
private:
|
||||
typedef std::map<std::string, std::function<AbstractScheduler*()>> factoryMap_t;
|
||||
std::string defaultScheduler;
|
||||
factoryMap_t schedulerFactories;
|
||||
|
||||
private:
|
||||
SchedulerManager(std::string defaultScheduler);
|
||||
|
||||
public:
|
||||
static void init(int argc, char** argv);
|
||||
|
||||
static void finish();
|
||||
|
||||
static SchedulerManager& getInstance();
|
||||
|
||||
public:
|
||||
~SchedulerManager() {}
|
||||
|
||||
AbstractScheduler* getDefaultScheduler();
|
||||
|
||||
AbstractScheduler* getSchedulerByName(std::string& name);
|
||||
|
||||
void markSchedulerForDeletion(AbstractScheduler* scheduler);
|
||||
};
|
||||
|
||||
} /* namespace scheduling */
|
||||
} /* namespace wfr */
|
||||
|
||||
Reference in New Issue
Block a user