ConditionImpl.h

Go to the documentation of this file.
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/Definitions.h"
00013 #include "dds/DCPS/PoolAllocator.h"
00014 #include "dds/DCPS/WaitSet.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 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00023 
00024 namespace OpenDDS {
00025 namespace DCPS {
00026 
00027 class ConditionImpl
00028   : public virtual OpenDDS::DCPS::LocalObject<DDS::Condition> {
00029 public:
00030   DDS::ReturnCode_t attach_to_ws(DDS::WaitSet_ptr ws);
00031   DDS::ReturnCode_t detach_from_ws(DDS::WaitSet_ptr ws);
00032   void signal_all();
00033 
00034 protected:
00035   ConditionImpl() {}
00036   virtual ~ConditionImpl() {}
00037 
00038   typedef OPENDDS_SET(OpenDDS::DCPS::WeakRcHandle<DDS::WaitSet>) WaitSetSet;
00039   WaitSetSet waitsets_;
00040   /// Use a recursive mutex because we have derived classes that
00041   /// need the recursive behavior
00042   ACE_Recursive_Thread_Mutex lock_;
00043 };
00044 
00045 } // namespace DCPS
00046 } // namespace OpenDDS
00047 
00048 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00049 
00050 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1