00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE 00009 00010 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00011 00012 namespace OpenDDS { 00013 namespace DCPS { 00014 00015 ACE_INLINE 00016 WriterCoherentSample::WriterCoherentSample ( 00017 ACE_UINT32 num_sample, 00018 SequenceNumber last_sample) 00019 : num_samples_ (num_sample), 00020 last_sample_ (last_sample) 00021 {} 00022 00023 00024 ACE_INLINE 00025 void WriterCoherentSample::reset () 00026 { 00027 num_samples_ = 0; 00028 last_sample_ = SequenceNumber(); 00029 } 00030 00031 00032 ACE_INLINE 00033 CoherentChangeControl::CoherentChangeControl() 00034 : coherent_samples_ (), 00035 group_coherent_ (false), 00036 publisher_id_ (GUID_UNKNOWN) 00037 { 00038 } 00039 00040 00041 ACE_INLINE 00042 size_t 00043 CoherentChangeControl::max_marshaled_size() 00044 { 00045 size_t sz = sizeof(this->coherent_samples_) 00046 + sizeof(this->group_coherent_); 00047 if (this->group_coherent_) { 00048 sz += sizeof(this->publisher_id_); 00049 sz += sizeof (ACE_UINT32); 00050 sz += this->group_coherent_samples_.size () * 00051 (sizeof(PublicationId) + sizeof(this->coherent_samples_)); 00052 } 00053 00054 return sz; 00055 } 00056 00057 ACE_INLINE 00058 void 00059 CoherentChangeControl::reset() 00060 { 00061 this->coherent_samples_ = WriterCoherentSample(); 00062 this->group_coherent_ = false; 00063 this->publisher_id_ = GUID_UNKNOWN; 00064 this->group_coherent_samples_.clear(); 00065 } 00066 00067 } // namespace DCPS 00068 } // namespace OpenDDS 00069 00070 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00071 00072 #endif // OPENDDS_NO_OBJECT_MODEL_PROFILE