|virtual void||Equals() = 0|
|virtual void||NotEquals(double delta) = 0|
|void||Validate(T &newValue, const T &oldValue)|
Member Function Documentation
Destroys the instance of IChangeValidator. The destructor is virtual.
Equals is called on Change validation when given values equal
NotEquals is called on Change validation when given values don't equal
delta is difference between newValue and oldValue, represented as double value
Revert is called after NotEquals on Change validation. When true is returned, the change is rejected, and newValue is assigned to oldValue.
Decides if the new value is accepted or not. Validate() is called by the value holder class that supports validators. Will call Equals() or NotEquals(), depending on difference between newValue and oldValue. If not equal, Revert() is called. If Revert() returns true, change is rejected, and newValue is assigned to oldValue.
newValue contains new value for evaluation.
oldValue contains previous accepted value.