OpenDDS  Snapshot(2023/04/28-20:55)
TransportRetainedElement.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 #include "EntryExit.h"
9 
11 
14  ACE_Message_Block* message,
15  const GUID_t& pubId
17  msg_(message),
18  publication_id_(pubId),
19  mb_allocator_(0),
20  db_allocator_(0),
21  is_duplicate_(true)
22 {
23 }
24 
27  const ACE_Message_Block* message,
28  const GUID_t& pubId,
29  MessageBlockAllocator* mb_allocator,
30  DataBlockAllocator* db_allocator
32  msg_(message ? TransportQueueElement::clone_mb(message,
33  mb_allocator,
34  db_allocator) : 0),
35  publication_id_(pubId),
36  mb_allocator_(mb_allocator),
37  db_allocator_(db_allocator),
38  is_duplicate_(false)
39 {
40 }
41 
44  const TransportRetainedElement& source
46  msg_(source.duplicate_msg()),
51 {
52  DBG_ENTRY_LVL("TransportRetainedElement", "TransportRetainedElement", 6);
53 }
54 
55 
57 bool
59 {
60  return !is_duplicate_;
61 }
62 
64 bool
66 {
67  return !is_duplicate_;
68 }
69 
virtual ACE_Message_Block * duplicate_msg() const
}
DataBlockAllocator * db_allocator_
Cached allocator for DataSampleHeader data block.
TransportRetainedElement(ACE_Message_Block *message, const GUID_t &pubId)
Construct with message block chain and Id values.
GUID_t publication_id_
Originating publication Id, if any.
MessageBlockAllocator * mb_allocator_
Cached allocator for DataSampleHeader message block.
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
static ACE_Message_Block * clone_mb(const ACE_Message_Block *msg, MessageBlockAllocator *mb_allocator, DataBlockAllocator *db_allocator)
#define ACE_INLINE
Base wrapper class around a data/control sample to be sent.