CoherentChangeControl.inl

Go to the documentation of this file.
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 namespace OpenDDS {
00011 namespace DCPS {
00012 
00013 ACE_INLINE
00014 WriterCoherentSample::WriterCoherentSample (
00015   ACE_UINT32 num_sample,
00016   SequenceNumber last_sample)
00017   : num_samples_ (num_sample),
00018     last_sample_ (last_sample)
00019   {}
00020 
00021 
00022 ACE_INLINE
00023 void WriterCoherentSample::reset ()
00024 {
00025   num_samples_ = 0;
00026   last_sample_ = SequenceNumber();
00027 }
00028 
00029 
00030 ACE_INLINE
00031 CoherentChangeControl::CoherentChangeControl()
00032   : coherent_samples_ (),
00033     group_coherent_ (false),
00034     publisher_id_ (GUID_UNKNOWN)
00035 {
00036 }
00037 
00038 
00039 ACE_INLINE
00040 size_t
00041 CoherentChangeControl::max_marshaled_size()
00042 {
00043   size_t sz = sizeof(this->coherent_samples_)
00044               + sizeof(this->group_coherent_);
00045   if (this->group_coherent_) {
00046     sz += sizeof(this->publisher_id_);
00047     sz += sizeof (ACE_UINT32);
00048     sz += this->group_coherent_samples_.size () *
00049           (sizeof(PublicationId) + sizeof(this->coherent_samples_));
00050   }
00051 
00052   return sz;
00053 }
00054 
00055 ACE_INLINE
00056 void
00057 CoherentChangeControl::reset()
00058 {
00059   this->coherent_samples_ = WriterCoherentSample();
00060   this->group_coherent_ = false;
00061   this->publisher_id_ = GUID_UNKNOWN;
00062   this->group_coherent_samples_.clear();
00063 }
00064 
00065 } // namespace DCPS
00066 } // namespace OpenDDS
00067 
00068 #endif // OPENDDS_NO_OBJECT_MODEL_PROFILE

Generated on Fri Feb 12 20:05:19 2016 for OpenDDS by  doxygen 1.4.7