00001
00002
00003
00004
00005
00006
00007
00008 #include "EntryExit.h"
00009
00010 namespace OpenDDS {
00011 namespace DCPS {
00012
00013 ACE_INLINE
00014 TransportCustomizedElement::TransportCustomizedElement(
00015 TransportQueueElement* orig, bool fragment, ACE_Allocator* allocator)
00016 : TransportQueueElement(1),
00017 orig_(orig),
00018 msg_(0),
00019 allocator_(allocator),
00020 publication_id_(orig ? orig->publication_id() : GUID_UNKNOWN),
00021 fragment_(fragment),
00022 exclusive_(false)
00023 {
00024 DBG_ENTRY_LVL("TransportCustomizedElement", "TransportCustomizedElement", 6);
00025 }
00026
00027 ACE_INLINE
00028 TransportCustomizedElement*
00029 TransportCustomizedElement::alloc(TransportQueueElement* orig,
00030 bool fragment ,
00031 ACE_Allocator* allocator )
00032 {
00033 if (allocator) {
00034 TransportCustomizedElement* ret;
00035 ACE_NEW_MALLOC_RETURN(ret,
00036 static_cast<TransportCustomizedElement*>(allocator->malloc(0)),
00037 TransportCustomizedElement(orig, fragment, allocator),
00038 0);
00039 return ret;
00040 } else {
00041 return new TransportCustomizedElement(orig, fragment, 0);
00042 }
00043 }
00044
00045 ACE_INLINE
00046 SequenceNumber
00047 TransportCustomizedElement::sequence() const
00048 {
00049 return this->orig_ ? this->orig_->sequence()
00050 : SequenceNumber::SEQUENCENUMBER_UNKNOWN();
00051 }
00052
00053 }
00054 }