00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_GUARDCONDITION_H 00009 #define OPENDDS_DCPS_GUARDCONDITION_H 00010 00011 #include "dds/DdsDcpsInfrastructureC.h" 00012 00013 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00014 #pragma once 00015 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00016 00017 #include "dds/DCPS/LocalObject.h" 00018 #include "dds/DCPS/ConditionImpl.h" 00019 00020 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00021 00022 namespace DDS { 00023 00024 class GuardCondition; 00025 typedef GuardCondition* GuardCondition_ptr; 00026 typedef TAO_Objref_Var_T<GuardCondition> GuardCondition_var; 00027 00028 class OpenDDS_Dcps_Export GuardCondition 00029 : public virtual OpenDDS::DCPS::LocalObject<DDS::GuardConditionInterf> 00030 , public virtual OpenDDS::DCPS::ConditionImpl { 00031 public: 00032 GuardCondition() 00033 : trigger_value_(false) 00034 {} 00035 00036 virtual ~GuardCondition() {} 00037 00038 CORBA::Boolean get_trigger_value(); 00039 00040 ReturnCode_t set_trigger_value(CORBA::Boolean value); 00041 00042 static GuardCondition_ptr _duplicate(GuardCondition_ptr obj); 00043 00044 private: 00045 CORBA::Boolean trigger_value_; 00046 }; 00047 00048 } // namespace DDS 00049 00050 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00051 00052 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00053 00054 namespace TAO { 00055 00056 template<> 00057 struct OpenDDS_Dcps_Export Objref_Traits<DDS::GuardCondition> { 00058 static DDS::GuardCondition_ptr duplicate(DDS::GuardCondition_ptr p); 00059 static void release(DDS::GuardCondition_ptr p); 00060 static DDS::GuardCondition_ptr nil(); 00061 static CORBA::Boolean marshal(const DDS::GuardCondition_ptr p, 00062 TAO_OutputCDR & cdr); 00063 }; 00064 00065 } // namespace TAO 00066 00067 TAO_END_VERSIONED_NAMESPACE_DECL 00068 00069 #endif