Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
RoR::CmdKeyArray Class Reference

Description

For backwards compatibility of the 'triggers' feature, the commandkey array must support negative indices of any size without breaking memory.

This class redirects the negative-indexed "virtual" commandkeys to auxiliary hashmap.

Definition at line 631 of file SimData.h.

Public Member Functions

command_t & operator[] (int index)
 

Private Attributes

std::array< command_t, MAX_COMMANDS+1 > m_commandkey
 
std::unordered_map< int, command_t > m_virtualkey
 
command_t m_dummykey
 

Member Function Documentation

◆ operator[]()

command_t & RoR::CmdKeyArray::operator[] ( int  index)
inline

Definition at line 634 of file SimData.h.

Field Documentation

◆ m_commandkey

std::array<command_t, MAX_COMMANDS + 1> RoR::CmdKeyArray::m_commandkey
private

BEWARE: commandkeys are indexed 1-MAX_COMMANDS!

Definition at line 651 of file SimData.h.

◆ m_dummykey

command_t RoR::CmdKeyArray::m_dummykey
private

Definition at line 653 of file SimData.h.

◆ m_virtualkey

std::unordered_map<int, command_t> RoR::CmdKeyArray::m_virtualkey
private

Negative-indexed commandkeys.

Definition at line 652 of file SimData.h.


The documentation for this class was generated from the following file: