00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_STATUSCONDITIONIMPL_H 00009 #define OPENDDS_DCPS_STATUSCONDITIONIMPL_H 00010 00011 #include "dds/DdsDcpsInfrastructureC.h" 00012 #include "dds/DCPS/ConditionImpl.h" 00013 00014 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00015 #pragma once 00016 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00017 00018 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00019 00020 namespace OpenDDS { 00021 namespace DCPS { 00022 00023 class EntityImpl; 00024 00025 class StatusConditionImpl 00026 : public virtual OpenDDS::DCPS::LocalObject<DDS::StatusCondition> 00027 , public virtual ConditionImpl { 00028 public: 00029 explicit StatusConditionImpl(EntityImpl* e) 00030 : parent_(e) 00031 , mask_(::OpenDDS::DCPS::DEFAULT_STATUS_MASK) 00032 {} 00033 00034 virtual ~StatusConditionImpl() {} 00035 00036 CORBA::Boolean get_trigger_value(); 00037 00038 virtual DDS::StatusMask get_enabled_statuses(); 00039 00040 virtual DDS::ReturnCode_t set_enabled_statuses(DDS::StatusMask mask); 00041 00042 virtual DDS::Entity_ptr get_entity(); 00043 00044 private: 00045 /// Deliberately not a _var, don't hold a reference to the parent since 00046 /// it is guaranteed to outlive us and we don't want a cyclical reference 00047 EntityImpl* parent_; 00048 DDS::StatusMask mask_; 00049 }; 00050 00051 } // namespace DCPS 00052 } // namespace OpenDDS 00053 00054 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00055 00056 #endif