Observer that logs Enigma machine events and engine messages to the console.
More...
|
| void | onRotorStepped (int rotorIndex, AlphabetIndex position) override |
| | Called when a rotor steps.
|
| |
| void | onCharEncrypted (char input, char output) override |
| | Called when a character is encrypted/decrypted.
|
| |
| void | log (LogLevel level, std::string_view message) override |
| |
| virtual | ~IEnigmaObserver () |
| |
Observer that logs Enigma machine events and engine messages to the console.
Definition at line 47 of file main.cpp.
◆ log()
| void ConsoleObserver::log |
( |
LogLevel |
level, |
|
|
std::string_view |
message |
|
) |
| |
|
inlineoverride |
◆ onCharEncrypted()
| void ConsoleObserver::onCharEncrypted |
( |
char |
input, |
|
|
char |
output |
|
) |
| |
|
inlineoverridevirtual |
Called when a character is encrypted/decrypted.
- Parameters
-
| input | The original input character. |
| output | The final output character. |
Implements IEnigmaObserver.
Definition at line 54 of file main.cpp.
◆ onRotorStepped()
| void ConsoleObserver::onRotorStepped |
( |
int |
rotorIndex, |
|
|
AlphabetIndex |
position |
|
) |
| |
|
inlineoverridevirtual |
Called when a rotor steps.
- Parameters
-
| rotorIndex | The index of the rotor (0 is the rightmost/fastest). |
| position | The new position of the rotor (0-25). |
Implements IEnigmaObserver.
Definition at line 50 of file main.cpp.
The documentation for this class was generated from the following file: