mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
Add simulators
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <map>
|
||||
|
||||
#include "simulator_base.hpp"
|
||||
|
||||
#define INSERT_SIMULATOR(type) p_simulators.insert(std::make_pair(type().name(), std::make_unique<type>()));
|
||||
|
||||
class Simulators {
|
||||
public:
|
||||
Simulators();
|
||||
void run();
|
||||
void stop();
|
||||
void switch_simulator(std::string name);
|
||||
Simulator_base* invoke_active_simulator() const;
|
||||
private:
|
||||
std::map<std::string, std::unique_ptr<Simulator_base>> p_simulators;
|
||||
std::string p_current_simulator;
|
||||
};
|
||||
Reference in New Issue
Block a user