I am trying to define an overall class, call it "Command" which can take an "enum Action" that defines which command to run. I would like to have this class represent any possible command (store each command's variable) but I don't want to define a class per command that inherits from the general Command class.
For example, the class Command defines an "enum Action" that defines which command to run. If it is start, it stores an int and a char*, if it is something like "setResolution", it stores two ints: width and height.
I would like this class to be able to represent any command, but I am not sure what is the best OO way to achieve this please. My OO is very rusty and I can't seem to find a solution that doesn't involve inheritance. Thank you.