00001
00002
00003
00004
00005
00006
00007
00008 #ifndef OPENDDS_DCPS_ENTITY_IMPL_H
00009 #define OPENDDS_DCPS_ENTITY_IMPL_H
00010
00011 #include "dds/DdsDcpsInfrastructureC.h"
00012 #include "ace/Atomic_Op_T.h"
00013 #include "dds/DCPS/LocalObject.h"
00014 #include "Definitions.h"
00015 #include "dds/DCPS/transport/framework/TransportConfig_rch.h"
00016
00017 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00018 #pragma once
00019 #endif
00020
00021 namespace OpenDDS {
00022 namespace DCPS {
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 class OpenDDS_Dcps_Export EntityImpl
00034 : public virtual LocalObject<DDS::Entity> {
00035 public:
00036
00037 EntityImpl();
00038
00039
00040 virtual ~EntityImpl();
00041
00042 virtual DDS::ReturnCode_t set_enabled();
00043 bool is_enabled() const;
00044
00045 virtual DDS::StatusCondition_ptr get_statuscondition();
00046
00047 virtual DDS::StatusMask get_status_changes();
00048
00049 virtual DDS::InstanceHandle_t get_instance_handle() = 0;
00050
00051 virtual void set_deleted(bool state);
00052
00053 virtual bool get_deleted();
00054
00055 void set_status_changed_flag(DDS::StatusKind status,
00056 bool status_changed_flag);
00057
00058
00059
00060 void notify_status_condition();
00061
00062 virtual void transport_config(const TransportConfig_rch& cfg);
00063 TransportConfig_rch transport_config() const;
00064
00065 virtual EntityImpl* parent() const { return 0; }
00066
00067 protected:
00068
00069 ACE_Atomic_Op<TAO_SYNCH_MUTEX, bool> enabled_;
00070
00071
00072 ACE_Atomic_Op<TAO_SYNCH_MUTEX, bool> entity_deleted_;
00073
00074 private:
00075
00076
00077
00078
00079
00080 DDS::StatusMask status_changes_;
00081 DDS::StatusCondition_var status_condition_;
00082
00083 TransportConfig_rch transport_config_;
00084
00085 mutable ACE_Thread_Mutex lock_;
00086 };
00087
00088 }
00089 }
00090
00091 #endif