EnigmaMachineCore 0.1.0
A modular Enigma Machine simulation in C++20
Loading...
Searching...
No Matches
EnigmaMachineConfig.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <string>
5#include <vector>
6#include "EnigmaTypes.hpp"
7#include "PlugBoardPair.hpp" // For PlugBoardPair and PLUGBOARD_MAX_PAIRS
8#include "config.hpp" // For TRANSFORMER_SIZE
9
16 AlphabetIndex notchPosition = 0;
18 std::array<AlphabetIndex, TRANSFORMER_SIZE> wiring;
19};
20
27 std::array<AlphabetIndex, TRANSFORMER_SIZE> wiring;
28};
29
39 int rotorCount = 0;
41 std::vector<AlphabetIndex> rotorPositions;
43 std::vector<RotorConfig> rotors;
47 std::array<PlugBoardPair, PLUGBOARD_MAX_PAIRS> plugBoardPairs;
48
54};
Header file for the PlugBoardPair struct.
Global configuration constants for the Enigma machine.
Configuration Data Transfer Object (DTO) for the Enigma Machine. Holds the raw configuration data req...
EnigmaMachineConfig()
Default constructor. Initializes plugboard pairs to -1 (unused).
std::vector< RotorConfig > rotors
Configuration for each rotor (in order).
std::vector< AlphabetIndex > rotorPositions
Initial rotational positions of the rotors.
std::array< PlugBoardPair, PLUGBOARD_MAX_PAIRS > plugBoardPairs
Plugboard connection pairs.
ReflectorConfig reflector
Configuration for the reflector.
int rotorCount
Number of rotors in the machine.
Configuration structure for a Reflector.
std::array< AlphabetIndex, TRANSFORMER_SIZE > wiring
The internal wiring permutation array (reflection map). Must be of size TRANSFORMER_SIZE.
Configuration structure for an individual Rotor.
AlphabetIndex notchPosition
The position (0 - (TRANSFORMER_SIZE - 1)) at which the rotor triggers the turnover of the next rotor.
std::array< AlphabetIndex, TRANSFORMER_SIZE > wiring
The internal wiring permutation array (forward direction). Must be of size TRANSFORMER_SIZE.