OpenDDS  Snapshot(2023/04/28-20:55)
TransportReplacedElement.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_TRANSPORTREPLACEDELEMENT_H
9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTREPLACEDELEMENT_H
10 
11 #include "dds/DCPS/dcps_export.h"
12 #include "TransportQueueElement.h"
14 #include "ace/Synch_Traits.h"
15 
17 
18 namespace OpenDDS {
19 namespace DCPS {
20 
22  : public TransportQueueElement {
23 public:
24 
26  MessageBlockAllocator* mb_allocator = 0,
27  DataBlockAllocator* db_allocator = 0);
28  virtual ~TransportReplacedElement();
29 
30  /// Accessor for the publisher id.
31  virtual GUID_t publication_id() const;
32 
33  virtual ACE_Message_Block* duplicate_msg() const;
34 
35  /// Accessor for the ACE_Message_Block
36  virtual const ACE_Message_Block* msg() const;
37 
38  virtual const ACE_Message_Block* msg_payload() const;
39 
40  virtual bool owned_by_transport();
41 
42  virtual bool is_retained_replaced() const;
43 
44 protected:
45 
46  virtual void release_element(bool dropped_by_transport);
47 
48 private:
49  /// Cached allocator for DataSampleHeader message block
51  /// Cached allocator for DataSampleHeader data block
53 
54  /// The publication_id() from the original TransportQueueElement
56 
57  /// A deep-copy of the msg() from the original TransportQueueElement.
59 };
60 
61 } // namespace DCPS
62 } // namespace OpenDDS
63 
65 
66 #if defined (__ACE_INLINE__)
68 #endif /* __ACE_INLINE__ */
69 
70 #endif /* OPENDDS_DCPS_TRANSPORTREPLACEDELEMENT_H */
DataBlockAllocator * db_allocator_
Cached allocator for DataSampleHeader data block.
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
GUID_t publisher_id_
The publication_id() from the original TransportQueueElement.
MessageBlockAllocator * mb_allocator_
Cached allocator for DataSampleHeader message block.
Message_Block_Ptr msg_
A deep-copy of the msg() from the original TransportQueueElement.
#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.