OpenDDS  Snapshot(2023/04/28-20:55)
TransportRetainedElement.h
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_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTRETAINEDELEMENT_H
9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTRETAINEDELEMENT_H
10 
11 #include "dds/DCPS/dcps_export.h"
13 #include "TransportQueueElement.h"
14 #include "ace/Synch_Traits.h"
15 
17 
18 namespace OpenDDS {
19 namespace DCPS {
20 
21 class TransportRetainedElement;
22 
24  : public TransportQueueElement {
25 public:
26 
27  /// Construct with message block chain and Id values.
29  ACE_Message_Block* message,
30  const GUID_t& pubId
31  );
32 
33  /// Construct with message block chain and Id values.
35  const ACE_Message_Block* message,
36  const GUID_t& pubId,
37  MessageBlockAllocator* mb_allocator_ = 0,
38  DataBlockAllocator* db_allocator_ = 0
39  );
40 
41  /// Copy constructor.
43 
44  virtual ~TransportRetainedElement();
45 
46  ///{ @name TransportQueueElement methods
47 
48  virtual GUID_t publication_id() const;
49 
50  virtual ACE_Message_Block* duplicate_msg() const;
51  virtual const ACE_Message_Block* msg() const;
52  virtual const ACE_Message_Block* msg_payload() const;
53 
54  virtual bool owned_by_transport();
55 
56  virtual bool is_retained_replaced() const;
57 
58 protected:
59  virtual void release_element(bool dropped_by_transport);
60 
61  ///}
62 
63 private:
64  /// Sample data, if any.
66 
67  /// Originating publication Id, if any.
69 
70  /// Cached allocator for DataSampleHeader message block
72  /// Cached allocator for DataSampleHeader data block
74 
76 };
77 
78 } // namespace DCPS
79 } // namespace OpenDDS
80 
82 
83 #if defined (__ACE_INLINE__)
85 #endif /* __ACE_INLINE__ */
86 
87 #endif /* OPENDDS_DCPS_TRANSPORTRETAINEDELEMENT_H */
DataBlockAllocator * db_allocator_
Cached allocator for DataSampleHeader data block.
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
GUID_t publication_id_
Originating publication Id, if any.
MessageBlockAllocator * mb_allocator_
Cached allocator for DataSampleHeader message block.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
Base wrapper class around a data/control sample to be sent.