CoreDX DDS Modern C++ API
|
A GuardCondition object is a specific Condition whose trigger_value is completely under the control of the application. More...
Public Member Functions | |
GuardCondition () | |
Create a dds::core::cond::GuardCondition. More... | |
template<typename FUN > | |
GuardCondition (FUN &functor) | |
Create a dds::core::cond::GuardCondition. More... | |
template<typename FUN > | |
GuardCondition (const FUN &functor) | |
Create a dds::core::cond::GuardCondition. More... | |
Public Member Functions inherited from dds::core::cond::Condition | |
template<typename Functor > | |
void | handler (Functor &func) |
Registers a functor as custom handler with this Condition. More... | |
template<typename Functor > | |
void | handler (const Functor &func) |
Registers a functor as custom handler with this Condition. More... | |
void | reset_handler () |
Resets the handler for this Condition. More... | |
void | dispatch () |
Dispatches the functors that have been registered with the condition, if the condition is in the 'triggered' state. More... | |
bool | trigger_value () const |
This operation retrieves the trigger_value of the Condition. | |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
A GuardCondition object is a specific Condition whose trigger_value is completely under the control of the application.
When first created the trigger_value is set to FALSE. The purpose of the GuardCondition is to provide the means for the application to manually wake up a WaitSet. This is accomplished by attaching the GuardCondition to the WaitSet and then setting the trigger_value by means of the set trigger_value operation.
dds::core::cond::GuardCondition::GuardCondition | ( | ) |
Create a dds::core::cond::GuardCondition.
The GuardCondition can then be added to a dds::core::cond::WaitSet so that the application can manually wake up a thread that is blocked on that WaitSet.
dds::core::Exception |
dds::core::cond::GuardCondition::GuardCondition | ( | FUN & | functor | ) |
Create a dds::core::cond::GuardCondition.
The GuardCondition can then be added to a dds::core::cond::WaitSet so that the application can manually wake up a thread that is blocked on that WaitSet.
The supplied functor will be called when this GuardCondition is triggered and either the inherited dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this GuardCondition is attached to.
functor | The functor to be called when the GuardCondition triggers. |
dds::core::Exception |
dds::core::cond::GuardCondition::GuardCondition | ( | const FUN & | functor | ) |
Create a dds::core::cond::GuardCondition.
The GuardCondition can then be added to a dds::core::cond::WaitSet so that the application can manually wake up a thread that is blocked on that WaitSet.
The supplied functor will be called when this GuardCondition is triggered and either the inherited dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this GuardCondition is attached to.
functor | The const functor to be called when the GuardCondition triggers. |
dds::core::Exception |