13#include "EnigmaCore_EXPORT.hpp"
14#include "EnigmaTypes.hpp"
52 ILogger* logger =
nullptr;
71 ILogger* logger =
nullptr);
81 explicit EnigmaMachine(std::string_view fileName, std::string_view assetPath =
"", ILogger* logger =
nullptr);
96 AlphabetIndex keyTransform(AlphabetIndex input);
102 void processBuffer(std::span<AlphabetIndex> buffer);
108 void setLogger(ILogger* logger);
123 void onRotorStepped(
int rotorIndex, AlphabetIndex position)
override;
Class representing the Enigma machine.
std::unique_ptr< RotorBox > rotorBox
EnigmaMachine & operator=(const EnigmaMachine &)=delete
std::unique_ptr< PlugBoard > plugBoard
EnigmaMachine(const EnigmaMachine &)=delete
~EnigmaMachine() override
std::vector< IEnigmaObserver * > observers
Interface for providing configuration/asset data. Abstracts the source of assets (filesystem,...
Class representing the PlugBoard (Steckerbrett) of the Enigma machine.
Class representing a box of rotors in the Enigma machine.
Configuration Data Transfer Object (DTO) for the Enigma Machine. Holds the raw configuration data req...
Interface for observing Enigma Machine events. Implement this interface to receive notifications abou...
virtual void onRotorStepped(int rotorIndex, AlphabetIndex position)=0
Called when a rotor steps.
virtual void onCharEncrypted(char input, char output)=0
Called when a character is encrypted/decrypted.