A GuardCondition object is a specific Condition whose trigger_value is completely under the control of the application.  
 More...
#include "GuardCondition.hpp"
Inherits dds::core::cond::Condition.
A GuardCondition object is a specific Condition whose trigger_value is completely under the control of the application. 
When a GuardCondition is initially created, the trigger_value is FALSE.
The purpose of the GuardCondition is to provide the means for the application to manually triggering a WaitSet to stop waiting. This is accomplished by attaching the GuardCondition to the WaitSet and then setting the trigger_value by means of the set trigger_value operation.
...
guard.trigger_value(true);
  See the WaitSet examples for more examples.
 Although the WaitSet examples use the StatusCondition, the basic usage of this Condition with a WaitSet is the same.
- See also
 - dds::core::cond::Condition 
 
- 
WaitSet concept 
 
- 
WaitSet examples 
 
Definition at line 67 of file GuardCondition.hpp.
 
◆ GuardCondition() [1/3]
      
        
          | dds::core::cond::GuardCondition::GuardCondition  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ GuardCondition() [2/3]
template<typename FUN > 
      
        
          | dds::core::cond::GuardCondition::GuardCondition  | 
          ( | 
          FUN &  | 
          functor | ) | 
           | 
        
      
 
 
◆ GuardCondition() [3/3]
template<typename FUN > 
      
        
          | dds::core::cond::GuardCondition::GuardCondition  | 
          ( | 
          const FUN &  | 
          functor | ) | 
           | 
        
      
 
 
◆ dispatch()
  
  
      
        
          | void dds::core::cond::Condition::dispatch  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
Dispatches the functor that have been registered with the Condition.
The Condition has to have been triggered for the functor will be called by this function.
- Returns
 - void 
 
- Exceptions
 - 
  
  
 
 
 
◆ handler() [1/2]
template<typename Functor > 
  
  
      
        
          | void dds::core::cond::Condition::handler  | 
          ( | 
          const Functor &  | 
          func | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ handler() [2/2]
template<typename Functor > 
  
  
      
        
          | void dds::core::cond::Condition::handler  | 
          ( | 
          Functor &  | 
          func | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ is_nil()
template<typename DELEGATE> 
 
Check if the referenced object is nil.
In other words, check if the reference is pointing to a null object.
- Returns
 - true if the referenced object is null. 
 
 
 
◆ operator!=() [1/2]
template<typename DELEGATE> 
 
Special operator!= used to check if this reference object does not equal the dds::core::null reference.
The non-null-check can be done like this: 
if (r != dds::core::null) {
   
}
- Returns
 - true if this reference is not null. 
 
 
 
◆ operator!=() [2/2]
template<typename DELEGATE> 
template<typename R > 
 
Compares two Reference objects and returns true if they are not equal.
Inequality is based on the referential inequality of the object being pointed to.
- Parameters
 - 
  
  
 
- Returns
 - true when not equal 
 
 
 
◆ operator->() [1/2]
template<typename DELEGATE> 
 
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows: 
my_dds_entity.standard_function();
my_dds_entity->vendor_specific_extension();
- Returns
 - a reference to delegate. 
 
 
 
◆ operator->() [2/2]
template<typename DELEGATE> 
 
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows: 
my_dds_entity.standard_function();
my_dds_entity->vendor_specific_extension();
- Returns
 - a reference to delegate. 
 
 
 
◆ operator==() [1/2]
template<typename DELEGATE> 
 
Special operator== used to check if this reference object equals the dds::core::null reference.
The null-check can be done like this: 
if (r == dds::core::null) {
   
}
- Returns
 - true if this reference is null. 
 
 
 
◆ operator==() [2/2]
template<typename DELEGATE> 
template<typename R > 
 
Compares two Reference objects and returns true if they are equal.
Equality is based on the referential equality of the object being pointed.
- Parameters
 - 
  
  
 
- Returns
 - true when equal 
 
 
 
◆ reset_handler()
  
  
      
        
          | void dds::core::cond::Condition::reset_handler  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
Resets the handler for this Condition.
After the invocation of this function no handler will be registered with this Condition.
- Returns
 - void 
 
- Exceptions
 - 
  
  
 
 
 
◆ trigger_value() [1/3]
      
        
          | bool dds::core::cond::GuardCondition::trigger_value  | 
          ( | 
           | ) | 
           | 
        
      
 
This operation retrieves the trigger_value of the Condition.
A Condition has a trigger_value that can be TRUE or FALSE and is set by the Data Distribution Service (except a GuardCondition). This operation returns the trigger_value of the Condition.
- Returns
 - bool The boolean value to which the Condition is set. 
 
- Exceptions
 - 
  
  
 
 
 
◆ trigger_value() [2/3]
  
  
      
        
          | bool dds::core::cond::Condition::trigger_value  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inherited   | 
  
 
This operation retrieves the trigger_value of the Condition.
A Condition has a trigger_value that can be TRUE or FALSE and is set by the Data Distribution Service (except a GuardCondition). This operation returns the trigger_value of the Condition.
- Returns
 - bool The boolean value to which the Condition is set. 
 
- Exceptions
 - 
  
  
 
 
 
◆ trigger_value() [3/3]
      
        
          | void dds::core::cond::GuardCondition::trigger_value  | 
          ( | 
          bool  | 
          value | ) | 
           | 
        
      
 
This operation sets the trigger_value of the GuardCondition.
A GuardCondition object is a specific Condition which trigger_value is completely under the control of the application. This operation must be used by the application to manually wake-up a WaitSet. This operation sets the trigger_value of the GuardCondition to the parameter value. The GuardCondition is directly created using the GuardCondition constructor. When a GuardCondition is initially created, the trigger_value is FALSE.
- Parameters
 - 
  
  
 
- Exceptions
 - 
  
  
 
 
 
The documentation for this class was generated from the following file: