wip: framework->interface

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

@ -20,7 +20,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
inline inline
@ -34,7 +34,7 @@ uint8_t toKeycode(Key key) {
} }
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope
@ -42,7 +42,7 @@ uint8_t toKeycode(Key key) {
#include "kaleidoscope/simulator/Framework.h" #include "kaleidoscope/simulator/Framework.h"
#include "kaleidoscope/simulator/executor/Executor.h" #include "kaleidoscope/simulator/executor/Executor.h"
#include "kaleidoscope/simulator/executor/AglaisInterface.h" #include "kaleidoscope/simulator/executor/AglaisInterface.h"
#include "kaleidoscope/simulator/framework/Visualization.h" #include "kaleidoscope/simulator/interface/Visualization.h"
#include "kaleidoscope/simulator/executor/actions/AssertLayerIsActive.h" #include "kaleidoscope/simulator/executor/actions/AssertLayerIsActive.h"
#include "kaleidoscope/simulator/executor/actions/AssertTopActiveLayerIs.h" #include "kaleidoscope/simulator/executor/actions/AssertTopActiveLayerIs.h"

@ -1,51 +0,0 @@
/* -*- mode: c++ -*-
* kaleidoscope::simulator - Testing API for Kaleidoscope
* Copyright (C) 2019 noseglasses (shinynoseglasses@gmail.com)
* Copyright (C) 2020 Keyboard.io, Inc
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/Simulator.h"
#include "kaleidoscope/simulator/framework/Visualization.h"
#include "kaleidoscope/simulator/framework/LED_Checks.h"
#include "kaleidoscope/simulator/framework/reports/BootKeyboardReport_.h"
#include "kaleidoscope/simulator/framework/reports/KeyboardReport_.h"
#include "kaleidoscope/simulator/framework/reports/MouseReport_.h"
#include "kaleidoscope/simulator/framework/reports/AbsoluteMouseReport_.h"
#include "kaleidoscope/simulator/framework/actions/Grouped.h"
#include "kaleidoscope/simulator/framework/actions/CustomAction.h"
#include "kaleidoscope/simulator/framework/actions/AssertNumOverallReportsEquals.h"
#include "kaleidoscope/simulator/framework/actions/Action_.h"
#include "kaleidoscope/simulator/framework/actions/AssertCycleIsNth.h"
#include "kaleidoscope/simulator/framework/actions/AssertElapsedTimeGreater.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/AssertReportEmpty.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/AssertReportEquals.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/DumpReport.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/AssertReportIsNthInCycle.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/CustomReportAction.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/AssertCycleGeneratesNReports.h"
#include "kaleidoscope/simulator/framework/actions/keyboard_report/AssertModifiersActive.h"
#include "kaleidoscope/simulator/framework/actions/keyboard_report/AssertAnyKeycodeActive.h"
#include "kaleidoscope/simulator/framework/actions/keyboard_report/AssertKeycodesActive.h"
#include "kaleidoscope/simulator/framework/actions/keyboard_report/AssertAnyModifierActive.h"
#endif

@ -0,0 +1,51 @@
/* -*- mode: c++ -*-
* kaleidoscope::simulator - Testing API for Kaleidoscope
* Copyright (C) 2019 noseglasses (shinynoseglasses@gmail.com)
* Copyright (C) 2020 Keyboard.io, Inc
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Visualization.h"
#include "kaleidoscope/simulator/interface/LED_Checks.h"
#include "kaleidoscope/simulator/interface/reports/BootKeyboardReport_.h"
#include "kaleidoscope/simulator/interface/reports/KeyboardReport_.h"
#include "kaleidoscope/simulator/interface/reports/MouseReport_.h"
#include "kaleidoscope/simulator/interface/reports/AbsoluteMouseReport_.h"
#include "kaleidoscope/simulator/interface/actions/Grouped.h"
#include "kaleidoscope/simulator/interface/actions/CustomAction.h"
#include "kaleidoscope/simulator/interface/actions/AssertNumOverallReportsEquals.h"
#include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/interface/actions/AssertCycleIsNth.h"
#include "kaleidoscope/simulator/interface/actions/AssertElapsedTimeGreater.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/AssertReportEmpty.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/AssertReportEquals.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/DumpReport.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/AssertReportIsNthInCycle.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/CustomReportAction.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/AssertCycleGeneratesNReports.h"
#include "kaleidoscope/simulator/interface/actions/keyboard_report/AssertModifiersActive.h"
#include "kaleidoscope/simulator/interface/actions/keyboard_report/AssertAnyKeycodeActive.h"
#include "kaleidoscope/simulator/interface/actions/keyboard_report/AssertKeycodesActive.h"
#include "kaleidoscope/simulator/interface/actions/keyboard_report/AssertAnyModifierActive.h"
#endif

@ -25,8 +25,8 @@
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h" #include "kaleidoscope/simulator/executor/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/framework/actions/generic_report/AssertReportEquals.h" #include "kaleidoscope/simulator/interface/actions/generic_report/AssertReportEquals.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
#include "HID-Settings.h" #include "HID-Settings.h"
namespace kaleidoscope { namespace kaleidoscope {
@ -38,7 +38,7 @@ namespace executor {
class SimulatorConsumerAdaptor : public log_protocol::Consumer_ { class SimulatorConsumerAdaptor : public log_protocol::Consumer_ {
public: public:
SimulatorConsumerAdaptor(framework::Simulator &simulator) SimulatorConsumerAdaptor(interface::Simulator &simulator)
: simulator_(simulator) : simulator_(simulator)
{} {}
@ -93,28 +93,28 @@ class SimulatorConsumerAdaptor : public log_protocol::Consumer_ {
case HID_REPORTID_KEYBOARD: { case HID_REPORTID_KEYBOARD: {
assert(length == sizeof(BootKeyboardReport::ReportDataType)); assert(length == sizeof(BootKeyboardReport::ReportDataType));
simulator_.reportActionsQueue().queue( simulator_.reportActionsQueue().queue(
framework::actions::AssertReportEquals<BootKeyboardReport> {data} interface::actions::AssertReportEquals<BootKeyboardReport> {data}
); );
} }
break; break;
case HID_REPORTID_MOUSE_ABSOLUTE: { case HID_REPORTID_MOUSE_ABSOLUTE: {
assert(length == sizeof(AbsoluteMouseReport::ReportDataType)); assert(length == sizeof(AbsoluteMouseReport::ReportDataType));
simulator_.reportActionsQueue().queue( simulator_.reportActionsQueue().queue(
framework::actions::AssertReportEquals<AbsoluteMouseReport> {data} interface::actions::AssertReportEquals<AbsoluteMouseReport> {data}
); );
} }
break; break;
case HID_REPORTID_MOUSE: { case HID_REPORTID_MOUSE: {
assert(length == sizeof(MouseReport::ReportDataType)); assert(length == sizeof(MouseReport::ReportDataType));
simulator_.reportActionsQueue().queue( simulator_.reportActionsQueue().queue(
framework::actions::AssertReportEquals<MouseReport> {data} interface::actions::AssertReportEquals<MouseReport> {data}
); );
} }
break; break;
case HID_REPORTID_NKRO_KEYBOARD: { case HID_REPORTID_NKRO_KEYBOARD: {
assert(length == sizeof(KeyboardReport::ReportDataType)); assert(length == sizeof(KeyboardReport::ReportDataType));
simulator_.reportActionsQueue().queue( simulator_.reportActionsQueue().queue(
framework::actions::AssertReportEquals<KeyboardReport> {data} interface::actions::AssertReportEquals<KeyboardReport> {data}
); );
} }
break; break;
@ -144,11 +144,11 @@ class SimulatorConsumerAdaptor : public log_protocol::Consumer_ {
private: private:
framework::Simulator &simulator_; interface::Simulator &simulator_;
}; };
void processAglaisDocument(const char *code, framework::Simulator &simulator) { void processAglaisDocument(const char *code, interface::Simulator &simulator) {
auto rwqa_state = simulator.getErrorIfReportWithoutQueuedActions(); auto rwqa_state = simulator.getErrorIfReportWithoutQueuedActions();
log_protocol::LogProtocol a; log_protocol::LogProtocol a;

@ -22,13 +22,13 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
} // namespace framework } // namespace interface
namespace executor { namespace executor {
void processAglaisDocument(const char *code, framework::Simulator &sim); void processAglaisDocument(const char *code, interface::Simulator &sim);
} // namespace executor } // namespace executor
} // namespace simulator } // namespace simulator

@ -34,8 +34,7 @@ namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace executor { namespace executor {
Executor::Executor(std::ostream &out) Executor::Executor(std::ostream &out) : interface::Simulator{out} {
: framework::Simulator{out} {
this->setCore( this->setCore(
std::shared_ptr<SimulatorCore> { std::shared_ptr<SimulatorCore> {
new SimulatorCore{} new SimulatorCore{}

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
/// @namespace kaleidoscope /// @namespace kaleidoscope
/// ///
@ -34,7 +34,7 @@ namespace executor {
/// @brief A Kaleidoscope specific simulator class. /// @brief A Kaleidoscope specific simulator class.
/// ///
class Executor : public framework::Simulator { class Executor : public interface::Simulator {
public: public:
/// @brief Access the global simulator singleton. /// @brief Access the global simulator singleton.

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
@ -28,7 +28,7 @@ namespace executor {
/// @brief A Kaleidoscope specific simulator core class. /// @brief A Kaleidoscope specific simulator core class.
/// ///
class SimulatorCore : public framework::SimulatorCore_ { class SimulatorCore : public interface::SimulatorCore_ {
public: public:
virtual void init() override; virtual void init() override;

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/layers.h" #include "kaleidoscope/layers.h"
@ -45,7 +45,7 @@ class AssertLayerIsActive {
private: private:
class Action : public framework::Action_ { class Action : public interface::Action_ {
public: public:

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/layers.h" #include "kaleidoscope/layers.h"
@ -44,7 +44,7 @@ class AssertTopActiveLayerIs {
private: private:
class Action : public framework::Action_ { class Action : public interface::Action_ {
public: public:

@ -23,7 +23,7 @@
#include "kaleidoscope/simulator/executor/reports/KeyboardReport.h" #include "kaleidoscope/simulator/executor/reports/KeyboardReport.h"
#include "kaleidoscope/simulator/executor/reports/MouseReport.h" #include "kaleidoscope/simulator/executor/reports/MouseReport.h"
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h" #include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h"
#include "kaleidoscope/simulator/framework/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 */
@ -82,7 +82,7 @@ class KeyboardReportEventCheck {
public: public:
KeyboardReportEventCheck(const framework::Simulator &simulator, KeyboardReportEventCheck(const interface::Simulator &simulator,
Display *display, Display *display,
const KeyboardReport &previous_report, const KeyboardReport &previous_report,
const KeyboardReport &current_report) const KeyboardReport &current_report)
@ -140,7 +140,7 @@ class KeyboardReportEventCheck {
private: private:
const framework::Simulator &simulator_; const interface::Simulator &simulator_;
Display *display_; Display *display_;
const KeyboardReport::ReportDataType &previous_report_data_; const KeyboardReport::ReportDataType &previous_report_data_;
const KeyboardReport::ReportDataType &current_report_data_; const KeyboardReport::ReportDataType &current_report_data_;
@ -150,7 +150,7 @@ class BootKeyboardReportEventCheck {
public: public:
BootKeyboardReportEventCheck(const framework::Simulator &simulator, BootKeyboardReportEventCheck(const interface::Simulator &simulator,
Display *display, Display *display,
const BootKeyboardReport &previous_report, const BootKeyboardReport &previous_report,
const BootKeyboardReport &current_report) const BootKeyboardReport &current_report)
@ -231,7 +231,7 @@ class BootKeyboardReportEventCheck {
private: private:
const framework::Simulator &simulator_; const interface::Simulator &simulator_;
Display *display_; Display *display_;
const BootKeyboardReport::ReportDataType &previous_report_data_; const BootKeyboardReport::ReportDataType &previous_report_data_;
const BootKeyboardReport::ReportDataType &current_report_data_; const BootKeyboardReport::ReportDataType &current_report_data_;

@ -20,8 +20,8 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include "kaleidoscope/simulator/framework/reports/Report_.h" #include "kaleidoscope/simulator/interface/reports/Report_.h"
#include <cassert> #include <cassert>
@ -55,7 +55,7 @@ class GenerateHostEvent {
private: private:
class Action : public framework::ReportAction<typename _ReportType::BaseReportType>, class Action : public interface::ReportAction<typename _ReportType::BaseReportType>,
public HostEventAction { public HostEventAction {
public: public:

@ -19,7 +19,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h" #include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
@ -50,11 +50,11 @@ AbsoluteMouseReport::AbsoluteMouseReport(const void *data) {
this->setReportData(report_data); this->setReportData(report_data);
} }
std::shared_ptr<framework::Report_> AbsoluteMouseReport::clone() const { std::shared_ptr<interface::Report_> AbsoluteMouseReport::clone() const {
return std::shared_ptr<framework::Report_> { new AbsoluteMouseReport{*this} }; return std::shared_ptr<interface::Report_> { new AbsoluteMouseReport{*this} };
} }
bool AbsoluteMouseReport::equals(const framework::Report_ &other) const { bool AbsoluteMouseReport::equals(const interface::Report_ &other) const {
const AbsoluteMouseReport *other_amr = const AbsoluteMouseReport *other_amr =
dynamic_cast<const AbsoluteMouseReport *>(&other); dynamic_cast<const AbsoluteMouseReport *>(&other);
@ -104,7 +104,7 @@ bool AbsoluteMouseReport::isEmpty() const {
&& (report_data_.wheel == 0); && (report_data_.wheel == 0);
} }
void AbsoluteMouseReport::dump(const framework::Simulator &simulator, const char *add_indent) const { void AbsoluteMouseReport::dump(const interface::Simulator &simulator, const char *add_indent) const {
simulator.log() << add_indent << "Absolute mouse report content:"; simulator.log() << add_indent << "Absolute mouse report content:";
simulator.log() << add_indent << " left button: " << this->isLeftButtonPressed(); simulator.log() << add_indent << " left button: " << this->isLeftButtonPressed();
simulator.log() << add_indent << " middle button: " << this->isMiddleButtonPressed(); simulator.log() << add_indent << " middle button: " << this->isMiddleButtonPressed();

@ -21,7 +21,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "DeviceAPIs/AbsoluteMouseAPI.h" #include "DeviceAPIs/AbsoluteMouseAPI.h"
#include "kaleidoscope/simulator/framework/reports/AbsoluteMouseReport_.h" #include "kaleidoscope/simulator/interface/reports/AbsoluteMouseReport_.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
// //
@ -40,7 +40,7 @@ class Simulator;
/// @brief An interface hat facilitates analyzing absolute mouse reports. /// @brief An interface hat facilitates analyzing absolute mouse reports.
/// ///
class AbsoluteMouseReport : public framework::AbsoluteMouseReport_ { class AbsoluteMouseReport : public interface::AbsoluteMouseReport_ {
public: public:
@ -74,13 +74,13 @@ class AbsoluteMouseReport : public framework::AbsoluteMouseReport_ {
AbsoluteMouseReport &operator=(const AbsoluteMouseReport &other); AbsoluteMouseReport &operator=(const AbsoluteMouseReport &other);
virtual std::shared_ptr<framework::Report_> clone() const override; virtual std::shared_ptr<interface::Report_> clone() const override;
/// @brief Checks equality with another report. /// @brief Checks equality with another report.
/// @param other Another report to compare with. /// @param other Another report to compare with.
/// @returns [bool] True if both reports are equal. /// @returns [bool] True if both reports are equal.
/// ///
virtual bool equals(const framework::Report_ &other) const override; virtual bool equals(const interface::Report_ &other) const override;
/// @brief Checks if a set of buttons is pressed. /// @brief Checks if a set of buttons is pressed.
/// @param button_state The state of the mouse buttons to check. /// @param button_state The state of the mouse buttons to check.
@ -133,7 +133,7 @@ class AbsoluteMouseReport : public framework::AbsoluteMouseReport_ {
/// to the simulator's log stream. /// to the simulator's log stream.
/// @param add_indent An additional indentation string. /// @param add_indent An additional indentation string.
/// ///
virtual void dump(const framework::Simulator &simulator, const char *add_indent = "") const override; virtual void dump(const interface::Simulator &simulator, const char *add_indent = "") const override;
/// @brief Associates the object with new report data. /// @brief Associates the object with new report data.
/// @param report_data The new report data struct. /// @param report_data The new report data struct.

@ -26,8 +26,8 @@
#include "kaleidoscope/simulator/executor/reports/BootKeyboardReport.h" #include "kaleidoscope/simulator/executor/reports/BootKeyboardReport.h"
#include "kaleidoscope/simulator/executor/aux/exceptions.h" #include "kaleidoscope/simulator/executor/aux/exceptions.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/framework/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include "MultiReport/Keyboard.h" #include "MultiReport/Keyboard.h"
#include <vector> #include <vector>
@ -54,13 +54,13 @@ BootKeyboardReport
this->setReportData(report_data); this->setReportData(report_data);
} }
std::shared_ptr<framework::Report_> BootKeyboardReport::clone() const { std::shared_ptr<interface::Report_> BootKeyboardReport::clone() const {
return std::shared_ptr<framework::Report_> { new BootKeyboardReport{*this} }; return std::shared_ptr<interface::Report_> { new BootKeyboardReport{*this} };
} }
bool bool
BootKeyboardReport BootKeyboardReport
::equals(const framework::Report_ &other) const { ::equals(const interface::Report_ &other) const {
const BootKeyboardReport *other_bkr = const BootKeyboardReport *other_bkr =
dynamic_cast<const BootKeyboardReport *>(&other); dynamic_cast<const BootKeyboardReport *>(&other);
@ -171,7 +171,7 @@ BootKeyboardReport
if((bitfield) & 1<<7) stream << str7; if((bitfield) & 1<<7) stream << str7;
void void
BootKeyboardReport BootKeyboardReport
::dump(const framework::Simulator &simulator, const char *add_indent) const { ::dump(const interface::Simulator &simulator, const char *add_indent) const {
bool anything = false; bool anything = false;
if (report_data_.modifiers) { if (report_data_.modifiers) {
anything = true; anything = true;

@ -21,7 +21,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/key_defs.h" #include "kaleidoscope/key_defs.h"
#include "kaleidoscope/simulator/framework/reports/BootKeyboardReport_.h" #include "kaleidoscope/simulator/interface/reports/BootKeyboardReport_.h"
#include "BootKeyboard/BootKeyboard.h" #include "BootKeyboard/BootKeyboard.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
@ -41,7 +41,7 @@ class Simulator;
/// @brief An interface hat facilitates analyzing boot keyboard reports. /// @brief An interface hat facilitates analyzing boot keyboard reports.
/// ///
class BootKeyboardReport : public framework::BootKeyboardReport_ { class BootKeyboardReport : public interface::BootKeyboardReport_ {
public: public:
@ -72,13 +72,13 @@ class BootKeyboardReport : public framework::BootKeyboardReport_ {
}; };
} }
virtual std::shared_ptr<framework::Report_> clone() const override; virtual std::shared_ptr<interface::Report_> clone() const override;
/// @brief Checks equality with another key report. /// @brief Checks equality with another key report.
/// @param other Another key report to compare with. /// @param other Another key report to compare with.
/// @returns [bool] True if both reports are equal. /// @returns [bool] True if both reports are equal.
/// ///
virtual bool equals(const framework::Report_ &other) const override; virtual bool equals(const interface::Report_ &other) const override;
/// @brief Checks if a keycode is active in the keyboard report. /// @brief Checks if a keycode is active in the keyboard report.
/// @param keycode The keycode to check for. /// @param keycode The keycode to check for.
@ -122,7 +122,7 @@ class BootKeyboardReport : public framework::BootKeyboardReport_ {
/// to the simulator's log stream. /// to the simulator's log stream.
/// @param add_indent An additional indentation string. /// @param add_indent An additional indentation string.
/// ///
virtual void dump(const framework::Simulator &simulator, const char *add_indent = "") const override; virtual void dump(const interface::Simulator &simulator, const char *add_indent = "") const override;
/// @brief Associates the object with new report data. /// @brief Associates the object with new report data.
/// @param report_data The new report data struct. /// @param report_data The new report data struct.

@ -26,7 +26,7 @@
#include "kaleidoscope/simulator/executor/reports/KeyboardReport.h" #include "kaleidoscope/simulator/executor/reports/KeyboardReport.h"
#include "kaleidoscope/simulator/executor/aux/exceptions.h" #include "kaleidoscope/simulator/executor/aux/exceptions.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
#include <vector> #include <vector>
@ -52,13 +52,13 @@ KeyboardReport
this->setReportData(report_data); this->setReportData(report_data);
} }
std::shared_ptr<framework::Report_> KeyboardReport::clone() const { std::shared_ptr<interface::Report_> KeyboardReport::clone() const {
return std::shared_ptr<framework::Report_> { new KeyboardReport{*this} }; return std::shared_ptr<interface::Report_> { new KeyboardReport{*this} };
} }
bool bool
KeyboardReport KeyboardReport
::equals(const framework::Report_ &other) const { ::equals(const interface::Report_ &other) const {
const KeyboardReport *other_kr = const KeyboardReport *other_kr =
dynamic_cast<const KeyboardReport *>(&other); dynamic_cast<const KeyboardReport *>(&other);
@ -174,7 +174,7 @@ KeyboardReport
void void
KeyboardReport KeyboardReport
::dump(const framework::Simulator &simulator, const char *add_indent) const { ::dump(const interface::Simulator &simulator, const char *add_indent) const {
bool anything = false; bool anything = false;
if (report_data_.modifiers) anything = true; if (report_data_.modifiers) anything = true;
else for (int i = 0; i < KEY_BYTES; i++) if (report_data_.keys[i]) { else for (int i = 0; i < KEY_BYTES; i++) if (report_data_.keys[i]) {

@ -23,7 +23,7 @@
#include <stdint.h> #include <stdint.h>
#include "kaleidoscope/key_defs.h" #include "kaleidoscope/key_defs.h"
#include "kaleidoscope/simulator/framework/reports/KeyboardReport_.h" #include "kaleidoscope/simulator/interface/reports/KeyboardReport_.h"
#include "MultiReport/Keyboard.h" #include "MultiReport/Keyboard.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
@ -43,7 +43,7 @@ class Simulator;
/// @brief An interface hat facilitates analyzing keyboard reports. /// @brief An interface hat facilitates analyzing keyboard reports.
/// ///
class KeyboardReport : public framework::KeyboardReport_ { class KeyboardReport : public interface::KeyboardReport_ {
public: public:
@ -74,13 +74,13 @@ class KeyboardReport : public framework::KeyboardReport_ {
}; };
} }
virtual std::shared_ptr<framework::Report_> clone() const override; virtual std::shared_ptr<interface::Report_> clone() const override;
/// @brief Checks equality with another key report. /// @brief Checks equality with another key report.
/// @param other Another key report to compare with. /// @param other Another key report to compare with.
/// @returns [bool] True if both reports are equal. /// @returns [bool] True if both reports are equal.
/// ///
virtual bool equals(const framework::Report_ &other) const override; virtual bool equals(const interface::Report_ &other) const override;
/// @brief Checks if a keycode is active in the keyboard report. /// @brief Checks if a keycode is active in the keyboard report.
/// @param keycode The keycode to check for. /// @param keycode The keycode to check for.
@ -124,7 +124,7 @@ class KeyboardReport : public framework::KeyboardReport_ {
/// to the simulator's log stream. /// to the simulator's log stream.
/// @param add_indent An additional indentation string. /// @param add_indent An additional indentation string.
/// ///
virtual void dump(const framework::Simulator &simulator, const char *add_indent = "") const override; virtual void dump(const interface::Simulator &simulator, const char *add_indent = "") const override;
/// @brief Associates the object with new report data. /// @brief Associates the object with new report data.
/// @param report_data The new report data struct. /// @param report_data The new report data struct.

@ -20,7 +20,7 @@
#include "kaleidoscope/simulator/executor/reports/MouseReport.h" #include "kaleidoscope/simulator/executor/reports/MouseReport.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
@ -41,11 +41,11 @@ MouseReport::MouseReport(const void *data) {
this->setReportData(report_data); this->setReportData(report_data);
} }
std::shared_ptr<framework::Report_> MouseReport::clone() const { std::shared_ptr<interface::Report_> MouseReport::clone() const {
return std::shared_ptr<framework::Report_> { new MouseReport{*this} }; return std::shared_ptr<interface::Report_> { new MouseReport{*this} };
} }
bool MouseReport::equals(const framework::Report_ &other) const { bool MouseReport::equals(const interface::Report_ &other) const {
const MouseReport *other_mr = const MouseReport *other_mr =
dynamic_cast<const MouseReport *>(&other); dynamic_cast<const MouseReport *>(&other);
@ -96,7 +96,7 @@ bool MouseReport::isEmpty() const {
&& (report_data_.hWheel == 0); && (report_data_.hWheel == 0);
} }
void MouseReport::dump(const framework::Simulator &simulator, const char *add_indent) const { void MouseReport::dump(const interface::Simulator &simulator, const char *add_indent) const {
simulator.log() << add_indent << "Mouse report content:"; simulator.log() << add_indent << "Mouse report content:";
simulator.log() << add_indent << " left button: " << this->isLeftButtonPressed(); simulator.log() << add_indent << " left button: " << this->isLeftButtonPressed();
simulator.log() << add_indent << " middle button: " << this->isMiddleButtonPressed(); simulator.log() << add_indent << " middle button: " << this->isMiddleButtonPressed();

@ -21,7 +21,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "MultiReport/Mouse.h" #include "MultiReport/Mouse.h"
#include "kaleidoscope/simulator/framework/reports/MouseReport_.h" #include "kaleidoscope/simulator/interface/reports/MouseReport_.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
// //
@ -40,7 +40,7 @@ class Simulator;
/// @brief An interface hat facilitates analyzing mouse reports. /// @brief An interface hat facilitates analyzing mouse reports.
/// ///
class MouseReport : public framework::MouseReport_ { class MouseReport : public interface::MouseReport_ {
public: public:
@ -71,13 +71,13 @@ class MouseReport : public framework::MouseReport_ {
}; };
} }
virtual std::shared_ptr<framework::Report_> clone() const override; virtual std::shared_ptr<interface::Report_> clone() const override;
/// @brief Checks equality with another report. /// @brief Checks equality with another report.
/// @param other Another report to compare with. /// @param other Another report to compare with.
/// @returns [bool] True if both reports are equal. /// @returns [bool] True if both reports are equal.
/// ///
virtual bool equals(const framework::Report_ &other) const override; virtual bool equals(const interface::Report_ &other) const override;
/// @brief Checks if a set of buttons is pressed. /// @brief Checks if a set of buttons is pressed.
/// @param button_state The state of the mouse buttons to check. /// @param button_state The state of the mouse buttons to check.
@ -130,7 +130,7 @@ class MouseReport : public framework::MouseReport_ {
/// to the simulator's log stream. /// to the simulator's log stream.
/// @param add_indent An additional indentation string. /// @param add_indent An additional indentation string.
/// ///
virtual void dump(const framework::Simulator &simulator, const char *add_indent = "") const override; virtual void dump(const interface::Simulator &simulator, const char *add_indent = "") const override;
/// @brief Associates the object with new report data. /// @brief Associates the object with new report data.
/// @param report_data The new report data struct. /// @param report_data The new report data struct.

@ -20,8 +20,8 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Grouped.h" #include "kaleidoscope/simulator/interface/actions/Grouped.h"
#include "kaleidoscope/simulator/framework/aux/demangle.h" #include "kaleidoscope/simulator/interface/aux/demangle.h"
// Undefine some macros that are defined by Arduino // Undefine some macros that are defined by Arduino
#undef min #undef min
@ -33,7 +33,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -161,7 +161,7 @@ class ActionContainer {
std::deque<std::shared_ptr<_ActionType>> container_; std::deque<std::shared_ptr<_ActionType>> container_;
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,9 +20,9 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/ActionContainer.h" #include "kaleidoscope/simulator/interface/ActionContainer.h"
#include "kaleidoscope/simulator/framework/actions/Grouped.h" #include "kaleidoscope/simulator/interface/actions/Grouped.h"
#include "kaleidoscope/simulator/framework/aux/demangle.h" #include "kaleidoscope/simulator/interface/aux/demangle.h"
// Undefine some macros that are defined by Arduino // Undefine some macros that are defined by Arduino
#undef min #undef min
@ -34,7 +34,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
template<typename _ActionType> template<typename _ActionType>
ActionContainer<_ActionType> & ActionContainer<_ActionType> &
@ -134,7 +134,7 @@ ActionContainer<_ActionType>
action->setSimulator(&simulator_); action->setSimulator(&simulator_);
} }
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -22,7 +22,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
/// @brief An adaptor template that restricts access to /// @brief An adaptor template that restricts access to
/// action containers. /// action containers.
@ -96,7 +96,7 @@ class ActionQueueAdaptor {
_ContainerType &container_; _ContainerType &container_;
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,15 +18,15 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/LED_Checks.h" #include "kaleidoscope/simulator/interface/LED_Checks.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/framework/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include <iostream> #include <iostream>
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
void dumpKeyLEDState(const Simulator &simulator) { void dumpKeyLEDState(const Simulator &simulator) {
@ -97,7 +97,7 @@ void assertKeyLEDState(const Simulator &simulator,
} }
} }
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -24,7 +24,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -40,7 +40,7 @@ void dumpKeyLEDState(const Simulator &simulator);
void assertKeyLEDState(const Simulator &simulator, void assertKeyLEDState(const Simulator &simulator,
const uint8_t key_led_colors[][3]); const uint8_t key_led_colors[][3]);
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#include "Arduino.h" #include "Arduino.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/framework/ActionContainer_Impl.h" #include "kaleidoscope/simulator/interface/ActionContainer_Impl.h"
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/framework/aux/WallTimer.h" #include "kaleidoscope/simulator/interface/aux/WallTimer.h"
#include "kaleidoscope/simulator/framework/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
@ -34,7 +34,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
// Explicit template instanciations // Explicit template instanciations
// //
@ -661,7 +661,7 @@ void Simulator::runRemoteControlled(const std::function<void()> &cycle_callback,
thread_obj.join(); thread_obj.join();
} }
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,13 +20,13 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/ActionContainer.h" #include "kaleidoscope/simulator/interface/ActionContainer.h"
#include "kaleidoscope/simulator/framework/ActionQueueAdaptor.h" #include "kaleidoscope/simulator/interface/ActionQueueAdaptor.h"
#include "kaleidoscope/simulator/framework/reports/BootKeyboardReport_.h" #include "kaleidoscope/simulator/interface/reports/BootKeyboardReport_.h"
#include "kaleidoscope/simulator/framework/reports/KeyboardReport_.h" #include "kaleidoscope/simulator/interface/reports/KeyboardReport_.h"
#include "kaleidoscope/simulator/framework/reports/MouseReport_.h" #include "kaleidoscope/simulator/interface/reports/MouseReport_.h"
#include "kaleidoscope/simulator/framework/reports/AbsoluteMouseReport_.h" #include "kaleidoscope/simulator/interface/reports/AbsoluteMouseReport_.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include <vector> #include <vector>
#include <functional> #include <functional>
@ -35,7 +35,7 @@
/// ///
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
class SimulatorCore_; class SimulatorCore_;
@ -866,7 +866,7 @@ class Simulator {
#define SIMULATOR_ASSERT_CONDITION(SIMULATOR, ...) \ #define SIMULATOR_ASSERT_CONDITION(SIMULATOR, ...) \
SIMULATOR.assertCondition((__VA_ARGS__), #__VA_ARGS__) SIMULATOR.assertCondition((__VA_ARGS__), #__VA_ARGS__)
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -25,7 +25,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
/// @brief An interface to a specific keyboard. /// @brief An interface to a specific keyboard.
/// ///
@ -112,7 +112,7 @@ class SimulatorCore_ {
virtual void loop() = 0; virtual void loop() = 0;
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,10 +18,10 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/Visualization.h" #include "kaleidoscope/simulator/interface/Visualization.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/framework/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include "kaleidoscope/simulator/framework/aux/terminal_escape_sequences.h" #include "kaleidoscope/simulator/interface/aux/terminal_escape_sequences.h"
// Undef those stupid Arduino-macros conflicting with stl stuff // Undef those stupid Arduino-macros conflicting with stl stuff
// //
@ -35,7 +35,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
typedef std::map<uint8_t, std::string> KeyAddrToKeyString; typedef std::map<uint8_t, std::string> KeyAddrToKeyString;
@ -150,7 +150,7 @@ void renderKeyboard(const Simulator &simulator, const char *ascii_keyboard) {
} }
} }
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -22,7 +22,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -34,7 +34,7 @@ class Simulator;
/// ///
void renderKeyboard(const Simulator &simulator, const char *ascii_keyboard); void renderKeyboard(const Simulator &simulator, const char *ascii_keyboard);
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,13 +18,13 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/framework/aux/demangle.h" #include "kaleidoscope/simulator/interface/aux/demangle.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
void Action_::report(const char *add_indent) const { void Action_::report(const char *add_indent) const {
if (this->valid_) { if (this->valid_) {
@ -62,7 +62,7 @@ void Action_::describeState(const char *add_indent) const {
} }
} }
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -29,7 +29,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
class Report_; class Report_;
@ -183,7 +183,7 @@ auto unwrapAction(const _T &action) -> decltype(action.ptr()) {
return action.ptr(); return action.ptr();
} }
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that the current cycle is the nth. /// @brief Asserts that the current cycle is the nth.
@ -71,7 +71,7 @@ class AssertCycleIsNth {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,12 +20,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that that time that elapsed is greater than a given time in [ms]. /// @brief Asserts that that time that elapsed is greater than a given time in [ms].
@ -76,7 +76,7 @@ class AssertElapsedTimeGreater {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Checks the number of overall reports of a specific type. /// @brief Checks the number of overall reports of a specific type.
@ -74,7 +74,7 @@ class AssertNumOverallReportsEquals {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,13 +20,13 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include <functional> #include <functional>
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Executes a lambda function of type bool(const Simulator &). /// @brief Executes a lambda function of type bool(const Simulator &).
@ -75,7 +75,7 @@ class CustomAction {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,12 +18,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Grouped.h" #include "kaleidoscope/simulator/interface/actions/Grouped.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
void Grouped<ReportAction_>::Action::determineGroupType() { void Grouped<ReportAction_>::Action::determineGroupType() {
@ -47,7 +47,7 @@ void Grouped<ReportAction_>::Action::determineGroupType() {
} }
} }
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,9 +20,9 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include <vector> #include <vector>
@ -32,7 +32,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @private /// @private
@ -236,7 +236,7 @@ Grouped<ReportAction_> group_(ReportAction_ &action_dummy, const std::shared_ptr
} }
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,12 +20,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that there was a specific number of reports of a given /// @brief Asserts that there was a specific number of reports of a given
@ -73,7 +73,7 @@ class AssertCycleGeneratesNReports {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that the current report is empty. /// @brief Asserts that the current report is empty.
@ -59,7 +59,7 @@ class AssertReportEmpty {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,12 +20,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include "kaleidoscope/simulator/framework/Simulator.h" #include "kaleidoscope/simulator/interface/Simulator.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that the current report equals another report. /// @brief Asserts that the current report equals another report.
@ -93,7 +93,7 @@ class AssertReportEquals {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that the current report is the nth report in the current cycle. /// @brief Asserts that the current report is the nth report in the current cycle.
@ -70,7 +70,7 @@ class AssertReportIsNthInCycle {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,13 +20,13 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include <functional> #include <functional>
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Executes a lambda function of type bool(const _ReportType&). /// @brief Executes a lambda function of type bool(const _ReportType&).
@ -81,7 +81,7 @@ class CustomReportAction {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts nothing but dumps the current report instead. /// @brief Asserts nothing but dumps the current report instead.
@ -60,7 +60,7 @@ class DumpReport {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,14 +20,14 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/Action_.h" #include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/framework/reports/Report_.h" #include "kaleidoscope/simulator/interface/reports/Report_.h"
#include <cassert> #include <cassert>
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
/// @brief An abstract report action. /// @brief An abstract report action.
/// @details This abstract class serves as base class for any /// @details This abstract class serves as base class for any
@ -93,7 +93,7 @@ class ReportAction : public ReportAction_ {
} }
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that any keycodes are active in the current report. /// @brief Asserts that any keycodes are active in the current report.
@ -59,7 +59,7 @@ class AssertAnyKeycodeActive {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,11 +20,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Asserts that any modifiers are active in the current keyboard report. /// @brief Asserts that any modifiers are active in the current keyboard report.
@ -59,7 +59,7 @@ class AssertAnyModifierActive {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,12 +20,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include "kaleidoscope/simulator/framework/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Overload this function if you intent to use any other data type /// @brief Overload this function if you intent to use any other data type
@ -168,7 +168,7 @@ class AssertKeycodesActive {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,14 +20,14 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include "kaleidoscope/simulator/framework/SimulatorCore_.h" #include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include <algorithm> #include <algorithm>
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace actions { namespace actions {
/// @brief Overload this function if you intent to use any other data type /// @brief Overload this function if you intent to use any other data type
@ -169,7 +169,7 @@ class AssertModifiersActive {
}; };
} // namespace actions } // namespace actions
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,11 +18,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/aux/WallTimer.h" #include "kaleidoscope/simulator/interface/aux/WallTimer.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace aux { namespace aux {
void WallTimer::start() { void WallTimer::start() {
@ -36,7 +36,7 @@ double WallTimer::elapsed() {
} }
} // namespace aux } // namespace aux
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -24,7 +24,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace aux { namespace aux {
class WallTimer { class WallTimer {
@ -41,7 +41,7 @@ class WallTimer {
}; };
} // namespace aux } // namespace aux
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,7 +18,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/aux/demangle.h" #include "kaleidoscope/simulator/interface/aux/demangle.h"
#ifdef __GNUG__ #ifdef __GNUG__
#include <cstdlib> #include <cstdlib>
#include <memory> #include <memory>
@ -27,7 +27,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace aux { namespace aux {
#ifdef __GNUG__ #ifdef __GNUG__
@ -54,7 +54,7 @@ std::string demangle(const char* name) {
#endif #endif
} // namespace aux } // namespace aux
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -25,7 +25,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace aux { namespace aux {
/// @brief Demangles a C++ symbol name. /// @brief Demangles a C++ symbol name.
@ -40,7 +40,7 @@ std::string type(const T& t) {
} }
} // namespace aux } // namespace aux
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -22,7 +22,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace terminal_escape_sequences { namespace terminal_escape_sequences {
constexpr char reset_formatting[] = "\x1B[0m"; constexpr char reset_formatting[] = "\x1B[0m";
@ -31,7 +31,7 @@ constexpr char clear_screen[] = "\033[2J\033[1;1H";
constexpr char cursor_to_upper_left[] = "\x1B[0;0H"; constexpr char cursor_to_upper_left[] = "\x1B[0;0H";
} // namespace terminal_escape_sequences } // namespace terminal_escape_sequences
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/reports/Report_.h" #include "kaleidoscope/simulator/interface/reports/Report_.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
// //
@ -32,7 +32,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -95,7 +95,7 @@ class AbsoluteMouseReport_ : public Report_ {
} }
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/reports/Report_.h" #include "kaleidoscope/simulator/interface/reports/Report_.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
// //
@ -33,7 +33,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -88,7 +88,7 @@ class BootKeyboardReport_ : public Report_ {
} }
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/reports/Report_.h" #include "kaleidoscope/simulator/interface/reports/Report_.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
// //
@ -33,7 +33,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -88,7 +88,7 @@ class KeyboardReport_ : public Report_ {
} }
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/reports/Report_.h" #include "kaleidoscope/simulator/interface/reports/Report_.h"
// Undefine some macros defined by Arduino // Undefine some macros defined by Arduino
// //
@ -32,7 +32,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -95,7 +95,7 @@ class MouseReport_ : public Report_ {
}; };
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -32,7 +32,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
class Simulator; class Simulator;
@ -84,7 +84,7 @@ class Report_ {
} }
}; };
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -18,11 +18,11 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/framework/vendors/keyboardio/model01.h" #include "kaleidoscope/simulator/interface/vendors/keyboardio/model01.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace keyboardio { namespace keyboardio {
namespace model01 { namespace model01 {
const char *ascii_keyboard = const char *ascii_keyboard =
@ -46,7 +46,7 @@ const char *ascii_keyboard =
" ┗━━━━━━┛ ┗━━━━━━┛ \n"; " ┗━━━━━━┛ ┗━━━━━━┛ \n";
} // namespace model01 } // namespace model01
} // namespace keyboardio } // namespace keyboardio
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope

@ -22,7 +22,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace simulator { namespace simulator {
namespace framework { namespace interface {
namespace keyboardio { namespace keyboardio {
namespace model01 { namespace model01 {
@ -34,7 +34,7 @@ extern const char *ascii_keyboard;
} // namespace model01 } // namespace model01
} // namespace keyboardio } // namespace keyboardio
} // namespace framework } // namespace interface
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope
Loading…
Cancel
Save