OpenDDS::DCPS::StatusConditionImpl Class Reference

#include <StatusConditionImpl.h>

Inheritance diagram for OpenDDS::DCPS::StatusConditionImpl:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::StatusConditionImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 StatusConditionImpl (EntityImpl *e)
virtual ~StatusConditionImpl ()
CORBA::Boolean get_trigger_value ()
virtual DDS::StatusMask get_enabled_statuses ()
virtual DDS::ReturnCode_t set_enabled_statuses (DDS::StatusMask mask)
virtual DDS::Entity_ptr get_entity ()

Private Attributes

EntityImplparent_
DDS::StatusMask mask_

Detailed Description

Definition at line 23 of file StatusConditionImpl.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::StatusConditionImpl::StatusConditionImpl ( EntityImpl e  )  [inline, explicit]

Definition at line 27 of file StatusConditionImpl.h.

00028     : parent_(e)
00029     , mask_(::OpenDDS::DCPS::DEFAULT_STATUS_MASK)
00030   {}

virtual OpenDDS::DCPS::StatusConditionImpl::~StatusConditionImpl (  )  [inline, virtual]

Definition at line 32 of file StatusConditionImpl.h.

00032 {}


Member Function Documentation

DDS::StatusMask OpenDDS::DCPS::StatusConditionImpl::get_enabled_statuses (  )  [virtual]

Implements DDS::StatusCondition.

Definition at line 29 of file StatusConditionImpl.cpp.

References OpenDDS::DCPS::ConditionImpl::lock_, and mask_.

00030 {
00031   ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, g, lock_, 0);
00032   return mask_;
00033 }

DDS::Entity_ptr OpenDDS::DCPS::StatusConditionImpl::get_entity (  )  [virtual]

Implements DDS::StatusCondition.

Definition at line 45 of file StatusConditionImpl.cpp.

References parent_.

00046 {
00047   return DDS::Entity::_duplicate(parent_);
00048 }

CORBA::Boolean OpenDDS::DCPS::StatusConditionImpl::get_trigger_value (  ) 

Implements DDS::Condition.

Definition at line 15 of file StatusConditionImpl.cpp.

References OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::EntityImpl::get_status_changes(), OpenDDS::DCPS::ConditionImpl::lock_, mask_, and parent_.

00016 {
00017   if (DCPS_debug_level > 9) {
00018     ACE_DEBUG((LM_DEBUG,
00019                ACE_TEXT("(%P|%t) StatusConditionImpl::get_trigger_value() - ")
00020                ACE_TEXT("mask==0x%x, changes==0x%x.\n"),
00021                this->mask_,
00022                this->parent_->get_status_changes()));
00023   }
00024 
00025   ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, g, lock_, false);
00026   return (parent_->get_status_changes() & mask_) > 0;
00027 }

DDS::ReturnCode_t OpenDDS::DCPS::StatusConditionImpl::set_enabled_statuses ( DDS::StatusMask  mask  )  [virtual]

Definition at line 36 of file StatusConditionImpl.cpp.

References OpenDDS::DCPS::ConditionImpl::lock_, mask_, DDS::RETCODE_OK, DDS::RETCODE_OUT_OF_RESOURCES, and OpenDDS::DCPS::ConditionImpl::signal_all().

00037 {
00038   ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, g, lock_,
00039                    DDS::RETCODE_OUT_OF_RESOURCES);
00040   mask_ = mask;
00041   signal_all();
00042   return DDS::RETCODE_OK;
00043 }


Member Data Documentation

DDS::StatusMask OpenDDS::DCPS::StatusConditionImpl::mask_ [private]

Definition at line 46 of file StatusConditionImpl.h.

Referenced by get_enabled_statuses(), get_trigger_value(), and set_enabled_statuses().

EntityImpl* OpenDDS::DCPS::StatusConditionImpl::parent_ [private]

Definition at line 45 of file StatusConditionImpl.h.

Referenced by get_entity(), and get_trigger_value().


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:06:25 2016 for OpenDDS by  doxygen 1.4.7