DeltaValidatorSendTrigger Class
(ServerIO::DeltaValidatorSendTrigger)DeltaValidatorSendTrigger is a class that implements the Equals(), NotEquals() and Revert() functions from IChangeValidator-class. More...
Header: | #include <IO/ServerIO/DeltaValidatorSendTrigger.h> |
Inherits: | IChangeValidator |
Public Functions
DeltaValidatorSendTrigger(ISendTrigger *triggerable, double delta = 0) | |
~DeltaValidatorSendTrigger() |
Reimplemented Public Functions
virtual void | Equals() override |
virtual void | NotEquals(double delta) override |
virtual bool | Revert() override |
- 4 public functions inherited from ServerIO::IChangeValidator
Detailed Description
DeltaValidatorSendTrigger is a class that implements the Equals(), NotEquals() and Revert() functions from IChangeValidator-class.
This implementation of NotEquals() will call FlagForSend() in ISendTrigger if NotEquals()'s argument delta is larger or equal to constructor's delta.
See also IOServer, ServerIO, ServerIO::IChangeValidator, and ServerIO::ISendTrigger.
Member Function Documentation
DeltaValidatorSendTrigger::DeltaValidatorSendTrigger(ISendTrigger *triggerable, double delta = 0)
DeltaValidatorSendTrigger constructor that takes in ISendTrigger pointer and a delta.
triggerable should contain ISendTrigger pointer that may be used to call FlagForSend() in NotEquals().
delta should contain a delta-limit which is compared to NotEquals()'s argument delta.
DeltaValidatorSendTrigger::~DeltaValidatorSendTrigger()
Destroys the instance of DeltaValidatorSendTrigger.
[override virtual]
void DeltaValidatorSendTrigger::Equals()
Reimplemented from IChangeValidator::Equals().
Does nothing, needed to implement the pure virtual function IChangeValidator::Equals().
[override virtual]
void DeltaValidatorSendTrigger::NotEquals(double delta)
Reimplemented from IChangeValidator::NotEquals().
If absolute value of delta is larger or equal to delta-limit specified in constructor, FlagForSend() is called. Otherwise, an internal flag is set, so next time Revert() is called, Revert() will return true
.
[override virtual]
bool DeltaValidatorSendTrigger::Revert()
Reimplemented from IChangeValidator::Revert().
Returns true
if absolute value of delta in previous NotEquals()-call was less than delta-limit specified in constructor. Otherwise, false is returned.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.