Created
June 7, 2017 09:42
-
-
Save AlexanderBrevig/6e584541b8093ee21da975d90db94cdc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ONOFF_ {}; typedef const ONOFF_ * const ONOFF; | |
class BLINKSPEED_ {}; typedef const BLINKSPEED_ * const BLINKSPEED; | |
class ON_ : public ONOFF_ {}; const ON_ on_; const ON_ * const ON = &on_; | |
class SLOW_ : public BLINKSPEED_ {}; const SLOW_ slow_; const SLOW_ * const SLOW = &slow_; | |
class OFF_ : public ONOFF_, public BLINKSPEED_ {}; const OFF_ off_; const OFF_ * const OFF = &off_; | |
class FAST_ : public BLINKSPEED_ {}; const FAST_ fast_; const FAST_ * const FAST = &fast_; | |
class MED_ : public BLINKSPEED_ {}; const MED_ med_; const MED_ * const MED = &med_; | |
/* void setFan(ONOFF onOrOff) {}*/// would only accept either ON or OFF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment