00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_CONDITIONIMPL_H 00009 #define OPENDDS_DCPS_CONDITIONIMPL_H 00010 00011 #include "dds/DdsDcpsInfrastructureC.h" 00012 #include "dds/DCPS/WaitSet.h" 00013 #include "dds/DCPS/Definitions.h" 00014 #include "dds/DCPS/PoolAllocator.h" 00015 00016 #include "ace/Recursive_Thread_Mutex.h" 00017 00018 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00019 #pragma once 00020 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00021 00022 namespace OpenDDS { 00023 namespace DCPS { 00024 00025 class ConditionImpl 00026 : public virtual OpenDDS::DCPS::LocalObject<DDS::Condition> { 00027 public: 00028 DDS::ReturnCode_t attach_to_ws(DDS::WaitSet_ptr ws); 00029 DDS::ReturnCode_t detach_from_ws(DDS::WaitSet_ptr ws); 00030 void signal_all(); 00031 00032 protected: 00033 ConditionImpl() {} 00034 virtual ~ConditionImpl() {} 00035 00036 typedef OPENDDS_SET_CMP(DDS::WaitSet_var, VarLess<DDS::WaitSet> ) WaitSetSet; 00037 WaitSetSet waitsets_; 00038 ACE_Recursive_Thread_Mutex lock_; 00039 }; 00040 00041 } // namespace DCPS 00042 } // namespace OpenDDS 00043 00044 #endif