Created
August 13, 2013 03:26
-
-
Save AlexanderBrevig/6217634 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 PropertyTester { | |
public: | |
PropertyTester() | |
: threshold() | |
, increment(PropertyTester::incrementAssignSafetyGuard) | |
, isIncrementing(_isIncrementing) { | |
_isIncrementing = true; | |
} | |
Property<int> threshold; | |
ConstrainedProperty<int> increment; | |
ConstantProperty<bool> isIncrementing; | |
private: | |
static bool incrementAssignSafetyGuard(int a) { | |
return a > 0; | |
} | |
bool _isIncrementing; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment