57 AlphabetIndex
transform(AlphabetIndex position,
bool reverse =
false)
const override;
Class representing a rotor in the Enigma machine. This class inherits from the Transformer class and ...
~Rotor() override=default
void initReverseLookupTable()
Generates the reverse transformation lookup table.
AlphabetIndex transformReverse(AlphabetIndex position) const override
Transforms the given position in reverse using the reverse LUT.
void setPosition(int position) override
Sets the rotor to a specific position.
AlphabetIndex transform(AlphabetIndex position, bool reverse=false) const override
Transforms the given position based on the transformation lookup table (LUT).
int getPosition() const override
Gets the current position of the rotor.
int rotate() override
Rotates the rotor by one position. If the rotor reaches the notch position, it returns 1,...
bool isNotchPosition(int position) const
Checks if the given position is the notch position.
AlphabetIndex transformForward(AlphabetIndex position) const override
Transforms the given position forward using the forward LUT.
int initRotorPosition(int offset=0)
Initializes the rotor position. This function sets the initial position of the rotor based on the pro...
Configuration structure for an individual Rotor.