OpenDDS  Snapshot(2023/04/28-20:55)
InstanceDataSampleList.cpp
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 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/
10 #include "DataSampleElement.h"
11 #include "Definitions.h"
12 #include "PublicationInstance.h"
13 
15 
16 #if !defined (__ACE_INLINE__)
18 #endif /* __ACE_INLINE__ */
19 
21 
22 namespace OpenDDS {
23 namespace DCPS {
24 
25 bool
27 {
29  || (iter->handle_ && iter->handle_->samples_.head_ == iter);
30 }
31 
32 bool
34 {
35  if (head_ == 0) {
36  return false;
37  }
38 
39  if (stale == head_) {
40  DataSampleElement* tmp;
41  return dequeue_head(tmp);
42  }
43 
44  if (stale == tail_) {
47 
48  } else {
50  stale->next_instance_sample_;
53  }
54 
56  --size_;
57  return true;
58 }
59 
60 
61 } // namespace DCPS
62 } // namespace OpenDDS
63 
DataSampleElement * head_
The first element of the list.
DataSampleElement * tail_
The last element of the list.
ssize_t size_
Number of elements in the list.
bool dequeue(const DataSampleElement *stale)
static bool on_some_list(const DataSampleElement *iter)
DataSampleElement * previous_instance_sample_
DataSampleElement * next_instance_sample_
Thread of data within the instance.
PublicationInstance_rch handle_
bool dequeue_head(DataSampleElement *&stale)
InstanceDataSampleList samples_
History of the instance samples.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28