diff --git a/src/Kaleidoscope-Simulator.h b/src/Kaleidoscope-Simulator.h index 3fdfcbda..60b90fbb 100644 --- a/src/Kaleidoscope-Simulator.h +++ b/src/Kaleidoscope-Simulator.h @@ -19,6 +19,6 @@ #pragma once -#include "kaleidoscope/simulator/Executor.h" +#include "kaleidoscope/simulator/Simulator.h" #include "kaleidoscope/simulator/macros.h" #include "kaleidoscope/simulator/LogProtocolInterface.h" diff --git a/src/kaleidoscope/simulator/Executor.cpp b/src/kaleidoscope/simulator/Simulator.cpp similarity index 84% rename from src/kaleidoscope/simulator/Executor.cpp rename to src/kaleidoscope/simulator/Simulator.cpp index bb591fd1..59650b9c 100644 --- a/src/kaleidoscope/simulator/Executor.cpp +++ b/src/kaleidoscope/simulator/Simulator.cpp @@ -18,7 +18,7 @@ #ifdef KALEIDOSCOPE_VIRTUAL_BUILD -#include "kaleidoscope/simulator/Executor.h" +#include "kaleidoscope/simulator/Simulator.h" #include "kaleidoscope/simulator/SimulatorCore.h" #include "kaleidoscope/simulator/reports/KeyboardReport.h" #include "kaleidoscope/simulator/reports/BootKeyboardReport.h" @@ -33,26 +33,26 @@ namespace kaleidoscope { namespace simulator { -Executor::Executor(std::ostream &out) : interface::Simulator_{out} { +Simulator::Simulator(std::ostream &out) : interface::Simulator_{out} { this->setCore( std::shared_ptr { new SimulatorCore{} } ); - HIDReportObserver::resetHook(&Executor::processHIDReport); + HIDReportObserver::resetHook(&Simulator::processHIDReport); Kaleidoscope.device().keyScanner().setEnableReadMatrix(false); } -Executor &Executor::getInstance() { - static Executor sim{std::cout}; +Simulator &Simulator::getInstance() { + static Simulator sim{std::cout}; return sim; } -void Executor::processHIDReport(uint8_t id, const void* data, - int len, int result) { - auto &simulator = Executor::getInstance(); +void Simulator::processHIDReport(uint8_t id, const void* data, + int len, int result) { + auto &simulator = Simulator::getInstance(); switch (id) { // TODO: React appropriately on the following diff --git a/src/kaleidoscope/simulator/Executor.h b/src/kaleidoscope/simulator/Simulator.h similarity index 92% rename from src/kaleidoscope/simulator/Executor.h rename to src/kaleidoscope/simulator/Simulator.h index 307aa11c..d503ad1a 100644 --- a/src/kaleidoscope/simulator/Executor.h +++ b/src/kaleidoscope/simulator/Simulator.h @@ -32,16 +32,16 @@ namespace simulator { /// @brief A Kaleidoscope specific simulator class. /// -class Executor : public interface::Simulator_ { +class Simulator: public interface::Simulator_ { public: /// @brief Access the global simulator singleton. /// - static Executor &getInstance(); + static Simulator &getInstance(); private: - Executor(std::ostream &out); + Simulator(std::ostream &out); static void processHIDReport(uint8_t id, const void* data, int len, int result); diff --git a/src/kaleidoscope/simulator/macros.h b/src/kaleidoscope/simulator/macros.h index 575d161a..6e87ed2d 100644 --- a/src/kaleidoscope/simulator/macros.h +++ b/src/kaleidoscope/simulator/macros.h @@ -40,7 +40,7 @@ uint8_t toKeycode(Key key) { } // namespace kaleidoscope #include "kaleidoscope/simulator/Interface.h" -#include "kaleidoscope/simulator/Executor.h" +#include "kaleidoscope/simulator/Simulator.h" #include "kaleidoscope/simulator/LogProtocolInterface.h" #include "kaleidoscope/simulator/interface/Visualization.h" @@ -61,7 +61,7 @@ extern void executeTestFunction(); namespace kaleidoscope { \ namespace simulator { \ /* Forward declare the actual test function */ \ - void runSimulator(Executor &simulator); \ + void runSimulator(Simulator &simulator); \ } /* namespace simulator */ \ } /* namespace kaleidoscope */ \ \ @@ -71,5 +71,5 @@ extern void executeTestFunction(); void executeTestFunction() { \ setup(); /* setup Kaleidoscope */ \ using namespace kaleidoscope::simulator; \ - runSimulator(Executor::getInstance()); \ + runSimulator(Simulator::getInstance()); \ } diff --git a/test/simulator/Dummy/tests.h b/test/simulator/Dummy/tests.h index db2e7720..999ccdc6 100644 --- a/test/simulator/Dummy/tests.h +++ b/test/simulator/Dummy/tests.h @@ -23,7 +23,7 @@ KALEIDOSCOPE_SIMULATOR_INIT namespace kaleidoscope { namespace simulator { -void runSimulator(Executor &simulator) { +void runSimulator(Simulator &simulator) { using namespace actions; using namespace interface; diff --git a/test/simulator/HelloWorld/tests.h b/test/simulator/HelloWorld/tests.h index 0b34211f..0a3296a0 100644 --- a/test/simulator/HelloWorld/tests.h +++ b/test/simulator/HelloWorld/tests.h @@ -28,7 +28,7 @@ namespace simulator { extern const char aglais_test_recording[]; -void runSimulator(Executor &simulator) { +void runSimulator(Simulator &simulator) { using namespace actions;