I am trying to get working a structure based on constants. I have ObjectTypes
(KEYBOARD, MOUSE, HAPTIC...) which can have InputTypes
(the MOUSE can be DEFAULT and INVERSE, while KEYBOARD can be DEFAULT and NUMERIC and HAPTIC only can be DEFAULT).
To get this working I'm trying to use enums inside enums in a class called Constants
in C++. It might work passing a ObjectTypes
parameter and a InputTypes
parameter to a function, so I need something like this in the prototype:
changeInputSystem(SimulatorConstants::InputObject input, SimulatorConstants::InputTypes type)
But in C++, when I declare an enum every value taken out from this (internally) and some of them replace the others.
My code right now (and not working) is:
enum InputObject {
KEYBOARD,
MOUSE,
HAPTIC
};
enum InputTypes {
enum KeyboardTypes {
DEFAULT
};
enum MouseTypes {
DEFAULT,
INVERSE
};
enum HapticTypes {
DEFAULT
};
};
NOTE: I know there is no inheritance between enums, so I need any solution that can work in a similar way. Thanks.