CoreDX DDS Modern C++ API
|
A Condition is a root class for all the conditions that may be attached to a WaitSet. More...
Public Member Functions | |
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. | |
![]() | |
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 Condition is a root class for all the conditions that may be attached to a WaitSet.
This basic class is specialized in three classes that are known by the middleware: GuardCondition (Section 7.1.2.1.8), StatusCondition (Section 7.1.2.1.9), and ReadCondition (Section 7.1.2.5.8).
void dds::core::cond::Condition::dispatch | ( | ) |
Dispatches the functors that have been registered with the condition, if the condition is in the 'triggered' state.
The Condition must be 'triggered' for the functor to be called by this function.
void dds::core::cond::Condition::handler | ( | Functor & | func | ) |
Registers a functor as custom handler with this Condition.
The supplied functor will be called when this Condition is triggered and either the dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this Condition is attached to.
Functor | The functor to be called when the StatusCondition triggers. |
dds::core::Exception |
void dds::core::cond::Condition::handler | ( | const Functor & | func | ) |
Registers a functor as custom handler with this Condition.
The supplied functor will be called when this Condition is triggered and either the dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this Condition is attached to.
Functor | The const functor to be called when the StatusCondition triggers. |
dds::core::Exception |
void dds::core::cond::Condition::reset_handler | ( | ) |
Resets the handler for this Condition.
After the invocation of this function no handler will be registered with this Condition.
dds::core::Exception |