wip: drop the executor namespace

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/851/head
Gergely Nagy 4 years ago
parent ff06775608
commit 0fa406c5d1
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -18,11 +18,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/AglaisInterface.h" #include "kaleidoscope/simulator/AglaisInterface.h"
#include "kaleidoscope/simulator/executor/reports/KeyboardReport.h" #include "kaleidoscope/simulator/reports/KeyboardReport.h"
#include "kaleidoscope/simulator/executor/reports/BootKeyboardReport.h" #include "kaleidoscope/simulator/reports/BootKeyboardReport.h"
#include "kaleidoscope/simulator/executor/reports/MouseReport.h" #include "kaleidoscope/simulator/reports/MouseReport.h"
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h" #include "kaleidoscope/simulator/reports/AbsoluteMouseReport.h"
#include "kaleidoscope/simulator/LogProtocol.h" #include "kaleidoscope/simulator/LogProtocol.h"
#include "kaleidoscope/simulator/log_protocol/Consumer_.h" #include "kaleidoscope/simulator/log_protocol/Consumer_.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/AssertReportEquals.h" #include "kaleidoscope/simulator/interface/actions/generic_report/AssertReportEquals.h"
@ -31,7 +31,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
/// @private /// @private
/// ///
@ -160,7 +159,6 @@ void processAglaisDocument(const char *code, interface::Simulator_ &simulator) {
simulator.setErrorIfReportWithoutQueuedActions(rwqa_state); simulator.setErrorIfReportWithoutQueuedActions(rwqa_state);
} }
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -26,11 +26,8 @@ namespace interface {
class Simulator_; class Simulator_;
} // namespace interface } // namespace interface
namespace executor {
void processAglaisDocument(const char *code, interface::Simulator_ &sim); void processAglaisDocument(const char *code, interface::Simulator_ &sim);
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,12 +18,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/Executor.h" #include "kaleidoscope/simulator/Executor.h"
#include "kaleidoscope/simulator/executor/SimulatorCore.h" #include "kaleidoscope/simulator/SimulatorCore.h"
#include "kaleidoscope/simulator/executor/reports/KeyboardReport.h" #include "kaleidoscope/simulator/reports/KeyboardReport.h"
#include "kaleidoscope/simulator/executor/reports/BootKeyboardReport.h" #include "kaleidoscope/simulator/reports/BootKeyboardReport.h"
#include "kaleidoscope/simulator/executor/reports/MouseReport.h" #include "kaleidoscope/simulator/reports/MouseReport.h"
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h" #include "kaleidoscope/simulator/reports/AbsoluteMouseReport.h"
#include "Kaleidoscope.h" #include "Kaleidoscope.h"
#include "HIDReportObserver.h" #include "HIDReportObserver.h"
@ -32,7 +32,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
Executor::Executor(std::ostream &out) : interface::Simulator_{out} { Executor::Executor(std::ostream &out) : interface::Simulator_{out} {
this->setCore( this->setCore(
@ -84,7 +83,6 @@ void Executor::processHIDReport(uint8_t id, const void* data,
} }
} }
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -30,8 +30,6 @@ namespace kaleidoscope {
/// ///
namespace simulator { namespace simulator {
namespace executor {
/// @brief A Kaleidoscope specific simulator class. /// @brief A Kaleidoscope specific simulator class.
/// ///
class Executor : public interface::Simulator_ { class Executor : public interface::Simulator_ {
@ -49,7 +47,6 @@ class Executor : public interface::Simulator_ {
int len, int result); int len, int result);
}; };
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -40,13 +40,13 @@ uint8_t toKeycode(Key key) {
} // namespace kaleidoscope } // namespace kaleidoscope
#include "kaleidoscope/simulator/Interface.h" #include "kaleidoscope/simulator/Interface.h"
#include "kaleidoscope/simulator/executor/Executor.h" #include "kaleidoscope/simulator/Executor.h"
#include "kaleidoscope/simulator/executor/AglaisInterface.h" #include "kaleidoscope/simulator/AglaisInterface.h"
#include "kaleidoscope/simulator/interface/Visualization.h" #include "kaleidoscope/simulator/interface/Visualization.h"
#include "kaleidoscope/simulator/executor/actions/AssertLayerIsActive.h" #include "kaleidoscope/simulator/actions/AssertLayerIsActive.h"
#include "kaleidoscope/simulator/executor/actions/AssertTopActiveLayerIs.h" #include "kaleidoscope/simulator/actions/AssertTopActiveLayerIs.h"
#include "kaleidoscope/simulator/executor/actions/generic_report/GenerateHostEvent.h" #include "kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h"
#include <iostream> #include <iostream>
@ -60,10 +60,8 @@ extern void executeTestFunction();
\ \
namespace kaleidoscope { \ namespace kaleidoscope { \
namespace simulator { \ namespace simulator { \
namespace executor { \
/* Forward declare the actual test function */ \ /* Forward declare the actual test function */ \
void runSimulator(Executor &simulator); \ void runSimulator(Executor &simulator); \
} /* namespace executor */ \
} /* namespace simulator */ \ } /* namespace simulator */ \
} /* namespace kaleidoscope */ \ } /* namespace kaleidoscope */ \
\ \
@ -72,6 +70,6 @@ extern void executeTestFunction();
*/ \ */ \
void executeTestFunction() { \ void executeTestFunction() { \
setup(); /* setup Kaleidoscope */ \ setup(); /* setup Kaleidoscope */ \
using namespace kaleidoscope::simulator::executor; \ using namespace kaleidoscope::simulator; \
runSimulator(Executor::getInstance()); \ runSimulator(Executor::getInstance()); \
} }

@ -18,7 +18,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/SimulatorCore.h" #include "kaleidoscope/simulator/SimulatorCore.h"
#include "Kaleidoscope.h" #include "Kaleidoscope.h"
@ -29,7 +29,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
std::map<uint8_t, const char*> hid_code_to_string = { std::map<uint8_t, const char*> hid_code_to_string = {
{ 0x04, "A " }, // HID_KEYBOARD_A_AND_A { 0x04, "A " }, // HID_KEYBOARD_A_AND_A
@ -466,12 +465,11 @@ void SimulatorCore::loop() {
::loop(); ::loop();
} }
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope
unsigned long millis(void) { unsigned long millis(void) {
return kaleidoscope::simulator::executor::millis; return kaleidoscope::simulator::millis;
} }
#endif // KALEIDOSCOPE_VIRTUAL_BUILD #endif // KALEIDOSCOPE_VIRTUAL_BUILD

@ -24,7 +24,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
/// @brief A Kaleidoscope specific simulator core class. /// @brief A Kaleidoscope specific simulator core class.
/// ///
@ -58,7 +57,6 @@ class SimulatorCore : public interface::SimulatorCore_ {
virtual void loop() override; virtual void loop() override;
}; };
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -26,7 +26,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
namespace actions { namespace actions {
/// @brief Asserts that a given layer is active. /// @brief Asserts that a given layer is active.
@ -72,7 +71,6 @@ class AssertLayerIsActive {
}; };
} // namespace actions } // namespace actions
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -26,7 +26,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
namespace actions { namespace actions {
/// @brief Asserts that a given layer is the current top layer. /// @brief Asserts that a given layer is the current top layer.
@ -71,7 +70,6 @@ class AssertTopActiveLayerIs {
}; };
} // namespace actions } // namespace actions
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,11 +18,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/actions/generic_report/GenerateHostEvent.h" #include "kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h"
#include "kaleidoscope/simulator/executor/reports/BootKeyboardReport.h" #include "kaleidoscope/simulator/reports/BootKeyboardReport.h"
#include "kaleidoscope/simulator/executor/reports/KeyboardReport.h" #include "kaleidoscope/simulator/reports/KeyboardReport.h"
#include "kaleidoscope/simulator/executor/reports/MouseReport.h" #include "kaleidoscope/simulator/reports/MouseReport.h"
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h" #include "kaleidoscope/simulator/reports/AbsoluteMouseReport.h"
#include "kaleidoscope/simulator/interface/Simulator_.h" #include "kaleidoscope/simulator/interface/Simulator_.h"
#ifdef __unix__ /* __unix__ is usually defined by compilers targeting Unix systems */ #ifdef __unix__ /* __unix__ is usually defined by compilers targeting Unix systems */
@ -39,7 +39,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
namespace actions { namespace actions {
HostEventAction::HostEventAction() HostEventAction::HostEventAction()
@ -390,7 +389,6 @@ bool GenerateHostEvent<AbsoluteMouseReport>::Action::evalInternal() {
} }
} // namespace actions } // namespace actions
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -27,7 +27,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
namespace actions { namespace actions {
/// @private /// @private
@ -85,7 +84,6 @@ class GenerateHostEvent {
}; };
} // namespace actions } // namespace actions
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -25,7 +25,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
/// @private /// @private
/// ///
@ -46,7 +45,6 @@ struct OStringStreamWrapper {
#define KS_T_EXCEPTION(...) \ #define KS_T_EXCEPTION(...) \
throw std::runtime_error(OStringStreamWrapper() << __VA_ARGS__); throw std::runtime_error(OStringStreamWrapper() << __VA_ARGS__);
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,12 +18,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h" #include "kaleidoscope/simulator/reports/AbsoluteMouseReport.h"
#include "kaleidoscope/simulator/interface/Simulator_.h" #include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
AbsoluteMouseReport::AbsoluteMouseReport() AbsoluteMouseReport::AbsoluteMouseReport()
: report_data_{} { : report_data_{} {
@ -118,7 +117,6 @@ void AbsoluteMouseReport::setReportData(const AbsoluteMouseReport::ReportDataTyp
memcpy(&report_data_, &report_data, sizeof(report_data_)); memcpy(&report_data_, &report_data, sizeof(report_data_));
} }
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -34,7 +34,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
class Simulator; class Simulator;
@ -156,7 +155,6 @@ class AbsoluteMouseReport : public interface::AbsoluteMouseReport_ {
ReportDataType report_data_; ReportDataType report_data_;
}; };
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -24,8 +24,8 @@
// //
#include <stdint.h> #include <stdint.h>
#include "kaleidoscope/simulator/executor/reports/BootKeyboardReport.h" #include "kaleidoscope/simulator/reports/BootKeyboardReport.h"
#include "kaleidoscope/simulator/executor/aux/exceptions.h" #include "kaleidoscope/simulator/aux/exceptions.h"
#include "kaleidoscope/simulator/interface/Simulator_.h" #include "kaleidoscope/simulator/interface/Simulator_.h"
#include "kaleidoscope/simulator/interface/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include "MultiReport/Keyboard.h" #include "MultiReport/Keyboard.h"
@ -34,7 +34,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
BootKeyboardReport BootKeyboardReport
::BootKeyboardReport() ::BootKeyboardReport()
@ -204,7 +203,6 @@ BootKeyboardReport
} }
} }
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -35,7 +35,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
class Simulator; class Simulator;
@ -145,7 +144,6 @@ class BootKeyboardReport : public interface::BootKeyboardReport_ {
ReportDataType report_data_; ReportDataType report_data_;
}; };
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -24,15 +24,14 @@
// //
#include <stdint.h> #include <stdint.h>
#include "kaleidoscope/simulator/executor/reports/KeyboardReport.h" #include "kaleidoscope/simulator/reports/KeyboardReport.h"
#include "kaleidoscope/simulator/executor/aux/exceptions.h" #include "kaleidoscope/simulator/aux/exceptions.h"
#include "kaleidoscope/simulator/interface/Simulator_.h" #include "kaleidoscope/simulator/interface/Simulator_.h"
#include <vector> #include <vector>
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
KeyboardReport KeyboardReport
::KeyboardReport() ::KeyboardReport()
@ -240,7 +239,6 @@ KeyboardReport
} }
} }
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -37,7 +37,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
class Simulator; class Simulator;
@ -147,7 +146,6 @@ class KeyboardReport : public interface::KeyboardReport_ {
ReportDataType report_data_; ReportDataType report_data_;
}; };
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,13 +18,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/reports/MouseReport.h" #include "kaleidoscope/simulator/reports/MouseReport.h"
#include "kaleidoscope/simulator/interface/Simulator_.h" #include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
MouseReport::MouseReport() MouseReport::MouseReport()
: report_data_{} { : report_data_{} {
@ -111,7 +110,6 @@ void MouseReport::setReportData(const HID_MouseReport_Data_t &report_data) {
memcpy(&report_data_, &report_data, sizeof(report_data_)); memcpy(&report_data_, &report_data, sizeof(report_data_));
} }
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -34,7 +34,6 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
class Simulator; class Simulator;
@ -153,7 +152,6 @@ class MouseReport : public interface::MouseReport_ {
HID_MouseReport_Data_t report_data_; HID_MouseReport_Data_t report_data_;
}; };
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,7 +18,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/vendors/keyboardio/model01.h" #include "kaleidoscope/simulator/vendors/keyboardio/model01.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {

@ -17,7 +17,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "Kaleidoscope-Simulator.h" #include "Kaleidoscope-Simulator.h"
#include "kaleidoscope/simulator/executor/AglaisInterface.h" #include "kaleidoscope/simulator/AglaisInterface.h"
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
@ -26,7 +26,6 @@ KALEIDOSCOPE_SIMULATOR_INIT
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor {
extern const char aglais_test_recording[]; extern const char aglais_test_recording[];
@ -57,7 +56,6 @@ const char aglais_test_recording[] =
#include "IO_protocol.agl" #include "IO_protocol.agl"
; ;
} // namespace executor
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

Loading…
Cancel
Save