class generalGauge;
class linearGauge : public generalGauge;
class logarithmicGauge : public generalGauge;
class linearDigitalGauge : public linearGauge;
class linearAnalogGauge : public linearGauge;
class logarithmicDigitalGauge : public logarithmicGauge;
class logarithmicAnalogGauge : public logarithmicGauge;
Each gauge performs at least two functions: It processes incoming signals, and it displays data. So the fundamental member functions are:
process_signal()
display()
To determine the data members that should shared, we need to consider the features that gauges have in common. Here are some suggestions:
Resolution // The number of steps (increments) the gauge has
Scale // The number of steps per unit of input signal
Offset // Where "zero"is on the scale
Needle // The position to indicate current input signal
The last feature, the needle, is the part of the gauge that displays the incoming signals. This needls can be amoving hand on a circular dial, an arrow or a digital value.
The C++ features I will probably use are as follows: