I have a library base class (Controller
) and three sub-classes that inherit from Controller
(Sensor
, Output
, and Enviro
There would only be one static variable, however many subclasses you have. Is it meant to vary by subclass, or is it truly one global mapping? If it's the latter, then a static variable is appropriate. If not... well, there are various options, but you'd need to tell us what you're using the map for.