00001
00002
00003
00004
00005
00006
00007
00008 #ifndef OPENDDS_DCPS_PUBLICATION_INSTANCE_H
00009 #define OPENDDS_DCPS_PUBLICATION_INSTANCE_H
00010
00011 #include "dcps_export.h"
00012 #include "InstanceDataSampleList.h"
00013 #include "DataSampleElement.h"
00014 #include "dds/DCPS/PoolAllocationBase.h"
00015
00016 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00017 #pragma once
00018 #endif
00019
00020 namespace OpenDDS {
00021 namespace DCPS {
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 struct OpenDDS_Dcps_Export PublicationInstance : public PoolAllocationBase {
00034
00035 PublicationInstance(DataSample* registered_sample)
00036 : sequence_(),
00037 group_id_(0),
00038 registered_sample_(registered_sample),
00039 unregistered_(false),
00040 instance_handle_(0),
00041 deadline_timer_id_(-1) {
00042 }
00043
00044 ~PublicationInstance() {
00045
00046
00047
00048 registered_sample_->release();
00049 }
00050
00051
00052 SequenceNumber sequence_ ;
00053
00054
00055 CoherencyGroup group_id_ ;
00056
00057
00058 DataSample* registered_sample_;
00059
00060
00061 InstanceDataSampleList samples_;
00062
00063
00064 bool unregistered_;
00065
00066
00067 DDS::InstanceHandle_t instance_handle_;
00068
00069 ACE_Time_Value last_sample_tv_;
00070
00071 ACE_Time_Value cur_sample_tv_;
00072
00073 long deadline_timer_id_;
00074 };
00075
00076 }
00077 }
00078
00079 #endif