wip: interface::Simulator => interface::Simulator_

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

@ -39,7 +39,7 @@ uint8_t toKeycode(Key key) {
} // namespace simulator
} // namespace kaleidoscope
#include "kaleidoscope/simulator/Framework.h"
#include "kaleidoscope/simulator/Interface.h"
#include "kaleidoscope/simulator/executor/Executor.h"
#include "kaleidoscope/simulator/executor/AglaisInterface.h"
#include "kaleidoscope/simulator/interface/Visualization.h"

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include "kaleidoscope/simulator/interface/Visualization.h"
#include "kaleidoscope/simulator/interface/LED_Checks.h"

@ -26,7 +26,7 @@
#include "kaleidoscope/simulator/LogProtocol.h"
#include "kaleidoscope/simulator/log_protocol/Consumer_.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/AssertReportEquals.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include "HID-Settings.h"
namespace kaleidoscope {
@ -38,7 +38,7 @@ namespace executor {
class SimulatorConsumerAdaptor : public log_protocol::Consumer_ {
public:
SimulatorConsumerAdaptor(interface::Simulator &simulator)
SimulatorConsumerAdaptor(interface::Simulator_ &simulator)
: simulator_(simulator)
{}
@ -144,11 +144,11 @@ class SimulatorConsumerAdaptor : public log_protocol::Consumer_ {
private:
interface::Simulator &simulator_;
interface::Simulator_ &simulator_;
};
void processAglaisDocument(const char *code, interface::Simulator &simulator) {
void processAglaisDocument(const char *code, interface::Simulator_ &simulator) {
auto rwqa_state = simulator.getErrorIfReportWithoutQueuedActions();
log_protocol::LogProtocol a;

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

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

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

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

@ -19,7 +19,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/executor/reports/AbsoluteMouseReport.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope {
namespace simulator {
@ -104,7 +104,7 @@ bool AbsoluteMouseReport::isEmpty() const {
&& (report_data_.wheel == 0);
}
void AbsoluteMouseReport::dump(const interface::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 << " left button: " << this->isLeftButtonPressed();
simulator.log() << add_indent << " middle button: " << this->isMiddleButtonPressed();

@ -133,7 +133,7 @@ class AbsoluteMouseReport : public interface::AbsoluteMouseReport_ {
/// to the simulator's log stream.
/// @param add_indent An additional indentation string.
///
virtual void dump(const interface::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.
/// @param report_data The new report data struct.

@ -26,7 +26,7 @@
#include "kaleidoscope/simulator/executor/reports/BootKeyboardReport.h"
#include "kaleidoscope/simulator/executor/aux/exceptions.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include "MultiReport/Keyboard.h"
@ -171,7 +171,7 @@ BootKeyboardReport
if((bitfield) & 1<<7) stream << str7;
void
BootKeyboardReport
::dump(const interface::Simulator &simulator, const char *add_indent) const {
::dump(const interface::Simulator_ &simulator, const char *add_indent) const {
bool anything = false;
if (report_data_.modifiers) {
anything = true;

@ -122,7 +122,7 @@ class BootKeyboardReport : public interface::BootKeyboardReport_ {
/// to the simulator's log stream.
/// @param add_indent An additional indentation string.
///
virtual void dump(const interface::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.
/// @param report_data The new report data struct.

@ -26,7 +26,7 @@
#include "kaleidoscope/simulator/executor/reports/KeyboardReport.h"
#include "kaleidoscope/simulator/executor/aux/exceptions.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include <vector>
@ -174,7 +174,7 @@ KeyboardReport
void
KeyboardReport
::dump(const interface::Simulator &simulator, const char *add_indent) const {
::dump(const interface::Simulator_ &simulator, const char *add_indent) const {
bool anything = false;
if (report_data_.modifiers) anything = true;
else for (int i = 0; i < KEY_BYTES; i++) if (report_data_.keys[i]) {

@ -124,7 +124,7 @@ class KeyboardReport : public interface::KeyboardReport_ {
/// to the simulator's log stream.
/// @param add_indent An additional indentation string.
///
virtual void dump(const interface::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.
/// @param report_data The new report data struct.

@ -20,7 +20,7 @@
#include "kaleidoscope/simulator/executor/reports/MouseReport.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope {
namespace simulator {
@ -96,7 +96,7 @@ bool MouseReport::isEmpty() const {
&& (report_data_.hWheel == 0);
}
void MouseReport::dump(const interface::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 << " left button: " << this->isLeftButtonPressed();
simulator.log() << add_indent << " middle button: " << this->isMiddleButtonPressed();

@ -130,7 +130,7 @@ class MouseReport : public interface::MouseReport_ {
/// to the simulator's log stream.
/// @param add_indent An additional indentation string.
///
virtual void dump(const interface::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.
/// @param report_data The new report data struct.

@ -35,7 +35,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
/// @brief An auxiliary class that represents a container of action objects.
///
@ -49,7 +49,7 @@ class ActionContainer {
/// @brief Constructor.
/// @param simulator The associated Simulator object.
///
ActionContainer(Simulator &simulator)
ActionContainer(Simulator_ &simulator)
: simulator_(simulator)
{}
@ -157,7 +157,7 @@ class ActionContainer {
private:
Simulator &simulator_;
Simulator_ &simulator_;
std::deque<std::shared_ptr<_ActionType>> container_;
};

@ -19,7 +19,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/LED_Checks.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include <iostream>
@ -28,7 +28,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
void dumpKeyLEDState(const Simulator &simulator) {
void dumpKeyLEDState(const Simulator_ &simulator) {
std::cout << "const uint8_t key_led_colors[][3] = {\n";
@ -56,7 +56,7 @@ void dumpKeyLEDState(const Simulator &simulator) {
std::cout << "};\n\n";
}
void assertKeyLEDState(const Simulator &simulator,
void assertKeyLEDState(const Simulator_ &simulator,
const uint8_t key_led_colors[][3]) {
const auto &simulator_core = simulator.getCore();

@ -26,18 +26,18 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
/// @brief Dumps the state of the key LEDs as C++ code
///
void dumpKeyLEDState(const Simulator &simulator);
void dumpKeyLEDState(const Simulator_ &simulator);
/// @brief Compares the current state of the key LEDs to a representation
/// stored in an array.
/// @param key_led_colors An array of key LED state data to compare the current
/// state with.
///
void assertKeyLEDState(const Simulator &simulator,
void assertKeyLEDState(const Simulator_ &simulator,
const uint8_t key_led_colors[][3]);
} // namespace interface

@ -20,7 +20,7 @@
#include "Arduino.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include "kaleidoscope/simulator/interface/ActionContainer_Impl.h"
#include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/interface/aux/WallTimer.h"
@ -86,7 +86,7 @@ void SimulatorStream_::reactOnLineEnd() {
this->getOStream() << "\n";
}
ErrorStream::ErrorStream(const Simulator *simulator)
ErrorStream::ErrorStream(const Simulator_ *simulator)
: SimulatorStream_(simulator) {
auto &out = this->getOStream();
@ -119,7 +119,7 @@ void ErrorStream::reactOnLineStart() {
this->getOStream() << "!!! ";
}
DebugStream::DebugStream(const Simulator *simulator)
DebugStream::DebugStream(const Simulator_ *simulator)
: SimulatorStream_(simulator) {
if (this->mute()) {
return;
@ -155,7 +155,7 @@ void DebugStream::reactOnLineStart() {
this->getOStream() << "***Debug: ";
}
LogStream::LogStream(const Simulator *simulator)
LogStream::LogStream(const Simulator_ *simulator)
: SimulatorStream_(simulator) {
}
@ -167,7 +167,7 @@ LogStream::~LogStream() {
this->getOStream() << "\n";
}
HeaderStream::HeaderStream(const Simulator *simulator)
HeaderStream::HeaderStream(const Simulator_ *simulator)
: SimulatorStream_(simulator) {
if (this->mute()) {
return;
@ -205,7 +205,7 @@ void HeaderStream::reactOnLineStart() {
this->getOStream() << "### ";
}
Test::Test(Simulator *simulator, const char *name)
Test::Test(Simulator_ *simulator, const char *name)
: simulator_(simulator),
name_(name),
error_count_start_(simulator->getErrorCount()) {
@ -222,10 +222,10 @@ Test::~Test() {
}
}
Simulator::Simulator(std::ostream &out,
bool debug,
int cycle_duration,
bool abort_on_first_error)
Simulator_::Simulator_(std::ostream &out,
bool debug,
int cycle_duration,
bool abort_on_first_error)
: out_{&out},
debug_{debug},
@ -245,7 +245,7 @@ Simulator::Simulator(std::ostream &out,
this->headerText();
}
Simulator::~Simulator() {
Simulator_::~Simulator_() {
this->footerText();
if (!test_success_) {
@ -254,24 +254,24 @@ Simulator::~Simulator() {
}
}
void Simulator::pressKey(uint8_t row, uint8_t col) {
void Simulator_::pressKey(uint8_t row, uint8_t col) {
this->log() << "+ Activating key (" << (unsigned)row << ", " << (unsigned)col << ")";
simulator_core_->pressKey(row, col);
}
void Simulator::releaseKey(uint8_t row, uint8_t col) {
void Simulator_::releaseKey(uint8_t row, uint8_t col) {
this->log() << "+ Releasing key (" << (unsigned)row << ", " << (unsigned)col << ")";
simulator_core_->releaseKey(row, col);
}
void Simulator::tapKey(uint8_t row, uint8_t col) {
void Simulator_::tapKey(uint8_t row, uint8_t col) {
this->log() << "+- Tapping key (" << (unsigned)row << ", " << (unsigned)col << ")";
simulator_core_->tapKey(row, col);
}
void Simulator::multiTapKeyInternal(int num_taps, uint8_t row, uint8_t col,
int tap_interval_cycles,
std::shared_ptr<Action_> after_tap_and_cycles_action) {
void Simulator_::multiTapKeyInternal(int num_taps, uint8_t row, uint8_t col,
int tap_interval_cycles,
std::shared_ptr<Action_> after_tap_and_cycles_action) {
if (after_tap_and_cycles_action) {
after_tap_and_cycles_action->setSimulator(this);
}
@ -302,7 +302,7 @@ void Simulator::multiTapKeyInternal(int num_taps, uint8_t row, uint8_t col,
}
}
void Simulator::clearAllKeys() {
void Simulator_::clearAllKeys() {
this->log() << "- Clearing all keys";
uint8_t rows = 0, cols = 0;
@ -316,7 +316,7 @@ void Simulator::clearAllKeys() {
}
}
void Simulator::cycle(bool suppress_cycle_info_log) {
void Simulator_::cycle(bool suppress_cycle_info_log) {
if (!suppress_cycle_info_log) {
this->log() << "Running single scan cycle";
}
@ -328,8 +328,8 @@ void Simulator::cycle(bool suppress_cycle_info_log) {
}
}
void Simulator::cyclesInternal(int n,
const std::vector<std::shared_ptr<Action_>> &cycle_action_list) {
void Simulator_::cyclesInternal(int n,
const std::vector<std::shared_ptr<Action_>> &cycle_action_list) {
if (n == 0) {
n = scan_cycles_default_count_;
}
@ -344,7 +344,7 @@ void Simulator::cyclesInternal(int n,
this->log() << "";
}
void Simulator::advanceTimeBy(Simulator::TimeType delta_t) {
void Simulator_::advanceTimeBy(Simulator_::TimeType delta_t) {
this->checkCycleDurationSet();
@ -353,13 +353,13 @@ void Simulator::advanceTimeBy(Simulator::TimeType delta_t) {
this->skipTimeInternal(delta_t);
}
void Simulator::skipTimeInternal(Simulator::TimeType delta_t) {
void Simulator_::skipTimeInternal(Simulator_::TimeType delta_t) {
auto start_cycle = cycle_id_;
auto start_time = time_;
Simulator::TimeType elapsed_time = 0;
Simulator_::TimeType elapsed_time = 0;
while (elapsed_time < delta_t) {
this->cycleInternal(true /* only_log_reports */);
elapsed_time = time_ - start_time;
@ -370,7 +370,7 @@ void Simulator::skipTimeInternal(Simulator::TimeType delta_t) {
this->log() << "";
}
void Simulator::advanceTimeTo(TimeType time) {
void Simulator_::advanceTimeTo(TimeType time) {
if (time <= time_) {
this->error() << "Failed cycling to time " << time << " ms. Target time is in the past.";
return;
@ -383,12 +383,12 @@ void Simulator::advanceTimeTo(TimeType time) {
this->skipTimeInternal(delta_t);
}
void Simulator::init() {
void Simulator_::init() {
this->clearAllKeys();
simulator_core_->init();
}
bool Simulator::checkStatus() {
bool Simulator_::checkStatus() {
if (!queued_report_actions_.empty()) {
this->error() << "There are " << queued_report_actions_.size()
@ -415,7 +415,7 @@ bool Simulator::checkStatus() {
return false;
}
void Simulator::headerText() {
void Simulator_::headerText() {
// Foreground color yellow
//
@ -440,7 +440,7 @@ void Simulator::headerText() {
this->getOStream() << "\x1B[0m";
}
void Simulator::footerText() {
void Simulator_::footerText() {
// Foreground color yellow
//
@ -471,7 +471,7 @@ void Simulator::footerText() {
this->getOStream() << "\x1B[0m";
}
void Simulator::cycleInternal(bool only_log_reports) {
void Simulator_::cycleInternal(bool only_log_reports) {
++cycle_id_;
n_reports_in_cycle_ = 0;
@ -516,14 +516,14 @@ void Simulator::cycleInternal(bool only_log_reports) {
}
}
void Simulator::checkCycleDurationSet() {
void Simulator_::checkCycleDurationSet() {
if (cycle_duration_ == 0) {
this->error() << "Please set test.cycle_duration_ to a value in "
"[ms] greater zero before using time based testing";
}
}
void Simulator::assertNothingQueued() const {
void Simulator_::assertNothingQueued() const {
if (!queued_report_actions_.empty()) {
this->error() << "Report actions are left in queue";
}
@ -533,14 +533,14 @@ void Simulator::assertNothingQueued() const {
}
}
void Simulator::assertCondition(bool cond, const char *action_code) const {
void Simulator_::assertCondition(bool cond, const char *action_code) const {
if (!cond) {
this->error() << "Action failed: " << action_code;
}
}
void Simulator::runRealtime(TimeType duration,
const std::function<void()> &cycle_function) {
void Simulator_::runRealtime(TimeType duration,
const std::function<void()> &cycle_function) {
auto n_cycles = duration / cycle_duration_;
aux::WallTimer timer;
@ -591,12 +591,12 @@ class DataCollectorThread {
uint16_t key_bitfield_[n_bytes_per_row] = {};
std::mutex mutex_;
friend class Simulator;
friend class Simulator_;
};
void Simulator::runRemoteControlled(const std::function<void()> &cycle_callback,
bool realtime
) {
void Simulator_::runRemoteControlled(const std::function<void()> &cycle_callback,
bool realtime
) {
aux::WallTimer timer;
DataCollectorThread dct;

@ -37,7 +37,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
class SimulatorCore_;
class Action_;
@ -99,7 +99,7 @@ class SimulatorStream_ {
///
struct Endl {};
SimulatorStream_(const Simulator *simulator) : simulator_(simulator) {}
SimulatorStream_(const Simulator_ *simulator) : simulator_(simulator) {}
virtual ~SimulatorStream_() {}
@ -128,7 +128,7 @@ class SimulatorStream_ {
protected:
const Simulator *simulator_;
const Simulator_ *simulator_;
private:
@ -141,7 +141,7 @@ class ErrorStream : public SimulatorStream_ {
public:
ErrorStream(const Simulator *simulator);
ErrorStream(const Simulator_ *simulator);
template<typename _T>
ErrorStream &operator<<(const _T &t) {
@ -162,7 +162,7 @@ class DebugStream : public SimulatorStream_ {
public:
DebugStream(const Simulator *simulator);
DebugStream(const Simulator_ *simulator);
template<typename _T>
DebugStream &operator<<(const _T &t) {
@ -186,7 +186,7 @@ class LogStream : public SimulatorStream_ {
public:
LogStream(const Simulator *simulator);
LogStream(const Simulator_ *simulator);
virtual ~LogStream() override;
template<typename _T>
@ -205,7 +205,7 @@ class HeaderStream : public SimulatorStream_ {
public:
HeaderStream(const Simulator *simulator);
HeaderStream(const Simulator_ *simulator);
template<typename _T>
HeaderStream &operator<<(const _T &t) {
@ -229,12 +229,12 @@ class Test {
public:
Test(Simulator *simulator, const char *name);
Test(Simulator_ *simulator, const char *name);
~Test();
private:
Simulator *simulator_;
Simulator_ *simulator_;
const char *name_;
int error_count_start_;
};
@ -242,7 +242,7 @@ class Test {
/// @brief The main simulator object.
///
class Simulator {
class Simulator_ {
public:
@ -288,7 +288,7 @@ class Simulator {
public:
~Simulator();
~Simulator_();
/// @details If the ErrorIfReportWithoutQueuedActions is enabled
/// it is considered an error if no actions are queued
@ -712,10 +712,10 @@ class Simulator {
/// @param abort_on_first_error If enabled, testing is aborted after
/// the first error occurred.
///
Simulator(std::ostream &out,
bool debug = false,
int cycle_duration = 1,
bool abort_on_first_error = false);
Simulator_(std::ostream &out,
bool debug = false,
int cycle_duration = 1,
bool abort_on_first_error = false);
protected:

@ -19,7 +19,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/Visualization.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include "kaleidoscope/simulator/interface/SimulatorCore_.h"
#include "kaleidoscope/simulator/interface/aux/terminal_escape_sequences.h"
@ -113,7 +113,7 @@ class KeyboardRenderer {
const SimulatorCore_ &simulator_core_;
};
void renderKeyboard(const Simulator &simulator, const char *ascii_keyboard) {
void renderKeyboard(const Simulator_ &simulator, const char *ascii_keyboard) {
KeyAddrToKeyString lookup;
KeyboardRenderer kr{simulator.getCore()};

@ -24,7 +24,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
/// @brief Renders a keyboard's asscii representation.
///
@ -32,7 +32,7 @@ class Simulator;
/// @param ascii_keyboard The ascii representation of the keyboards
/// key layout.
///
void renderKeyboard(const Simulator &simulator, const char *ascii_keyboard);
void renderKeyboard(const Simulator_ &simulator, const char *ascii_keyboard);
} // namespace interface
} // namespace simulator

@ -20,7 +20,7 @@
#include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/interface/aux/demangle.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope {
namespace simulator {

@ -31,7 +31,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
class Report_;
/// @private
@ -87,7 +87,7 @@ class Action_ {
/// @brief Register the test simulator with the action.
///
virtual void setSimulator(const Simulator *simulator) {
virtual void setSimulator(const Simulator_ *simulator) {
simulator_ = simulator;
}
@ -96,7 +96,7 @@ class Action_ {
///
/// @return A pointer to the current test simulator.
///
const Simulator *getSimulator() const {
const Simulator_ *getSimulator() const {
return simulator_;
}
@ -161,7 +161,7 @@ class Action_ {
protected:
bool valid_ = false;
const Simulator *simulator_ = nullptr;
const Simulator_ *simulator_ = nullptr;
private:

@ -21,7 +21,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope {
namespace simulator {
@ -38,7 +38,7 @@ class AssertElapsedTimeGreater {
/// @param delta_t The amount of time that is asserted being elapsed.
/// @param start_t An optional start point in time as reference (defaults to zero).
///
AssertElapsedTimeGreater(Simulator::TimeType delta_t, Simulator::TimeType start_t = 0)
AssertElapsedTimeGreater(Simulator_::TimeType delta_t, Simulator_::TimeType start_t = 0)
: AssertElapsedTimeGreater(DelegateConstruction{}, delta_t, start_t)
{}
@ -48,7 +48,7 @@ class AssertElapsedTimeGreater {
public:
Action(Simulator::TimeType delta_t, Simulator::TimeType start_t = 0)
Action(Simulator_::TimeType delta_t, Simulator_::TimeType start_t = 0)
: start_t_(start_t),
delta_t_(delta_t)
{}
@ -68,8 +68,8 @@ class AssertElapsedTimeGreater {
private:
Simulator::TimeType start_t_ = .0;
Simulator::TimeType delta_t_ = .0;
Simulator_::TimeType start_t_ = .0;
Simulator_::TimeType delta_t_ = .0;
};
SIMULATOR_AUTO_DEFINE_ACTION_INVENTORY(AssertElapsedTimeGreater)

@ -19,7 +19,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/actions/Grouped.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope {
namespace simulator {

@ -20,7 +20,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
#include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
@ -59,7 +59,7 @@ class GroupedAction_ : public _ActionType {
}
}
virtual void setSimulator(const Simulator *simulator) override {
virtual void setSimulator(const Simulator_ *simulator) override {
this->Action_::setSimulator(simulator);
for (auto &action : actions_) {

@ -21,7 +21,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/actions/Action_.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope {
namespace simulator {

@ -21,7 +21,7 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include "kaleidoscope/simulator/interface/Simulator.h"
#include "kaleidoscope/simulator/interface/Simulator_.h"
namespace kaleidoscope {
namespace simulator {

@ -34,7 +34,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
/// @brief An interface hat facilitates analyzing absolute mouse reports.
///

@ -35,7 +35,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
/// @brief An interface hat facilitates analyzing boot keyboard reports.
///

@ -35,7 +35,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
/// @brief An interface hat facilitates analyzing keyboard reports.
///

@ -34,7 +34,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
/// @brief An interface hat facilitates analyzing mouse reports.
///

@ -34,7 +34,7 @@ namespace kaleidoscope {
namespace simulator {
namespace interface {
class Simulator;
class Simulator_;
enum {
AnyTypeReportTypeId = 0,
@ -74,7 +74,7 @@ class Report_ {
/// to the simulator's log stream.
/// @param add_indent An additional indentation string.
///
virtual void dump(const Simulator &simulator, const char *add_indent = "") const = 0;
virtual void dump(const Simulator_ &simulator, const char *add_indent = "") const = 0;
static const char *typeString() {
return "generic report";

Loading…
Cancel
Save