OpenDDS  Snapshot(2023/04/28-20:55)
CoherentChangeControl.inl
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE
9 
11 
12 namespace OpenDDS {
13 namespace DCPS {
14 
17  ACE_UINT32 num_sample,
18  SequenceNumber last_sample)
19  : num_samples_ (num_sample),
20  last_sample_ (last_sample)
21  {}
22 
23 
26 {
27  num_samples_ = 0;
29 }
30 
31 
34  : coherent_samples_ (),
35  group_coherent_ (false),
36  publisher_id_ (GUID_UNKNOWN)
37 {
38 }
39 
40 
43 {
44  size_t sz = sizeof(this->coherent_samples_)
45  + sizeof(this->group_coherent_);
46  if (this->group_coherent_) {
47  sz += sizeof(this->publisher_id_);
48  sz += sizeof (ACE_UINT32);
49  sz += this->group_coherent_samples_.size () *
50  (sizeof(GUID_t) + sizeof(this->coherent_samples_));
51  }
52 
53  return sz;
54 }
55 
57 void
59 {
61  this->group_coherent_ = false;
63  this->group_coherent_samples_.clear();
64 }
65 
66 } // namespace DCPS
67 } // namespace OpenDDS
68 
70 
71 #endif // OPENDDS_NO_OBJECT_MODEL_PROFILE
WriterCoherentSample(ACE_UINT32 num_sample=0, SequenceNumber last_sample=SequenceNumber())
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
size_t get_max_serialized_size()
Similar to IDL compiler generated methods.
Sequence number abstraction. Only allows positive 64 bit values.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
#define ACE_INLINE
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28