TransportSendElement.inl

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #include "EntryExit.h"
00009 
00010 ACE_INLINE
00011 OpenDDS::DCPS::TransportSendElement::TransportSendElement(int initial_count,
00012   const DataSampleElement* sample,
00013   TransportSendElementAllocator* allocator)
00014   : TransportQueueElement(initial_count),
00015     element_(sample),
00016     allocator_(allocator)
00017 {
00018   DBG_ENTRY_LVL("TransportSendElement","TransportSendElement",6);
00019 }
00020 
00021 ACE_INLINE /*static*/
00022 OpenDDS::DCPS::TransportSendElement*
00023 OpenDDS::DCPS::TransportSendElement::alloc(int initial_count,
00024                                            const DataSampleElement* sample)
00025 {
00026   TransportSendElement* ret;
00027   TransportSendElementAllocator* al = sample->get_transport_send_element_allocator();
00028   ACE_NEW_MALLOC_RETURN(ret,
00029     static_cast<TransportSendElement*>(al->malloc()),
00030     TransportSendElement(initial_count, sample, al),
00031     0);
00032   return ret;
00033 }
00034 
00035 ACE_INLINE
00036 bool
00037 OpenDDS::DCPS::TransportSendElement::owned_by_transport()
00038 {
00039   return false;
00040 }
00041 
00042 ACE_INLINE
00043 OpenDDS::DCPS::SequenceNumber
00044 OpenDDS::DCPS::TransportSendElement::sequence() const
00045 {
00046   return this->element_->get_header().sequence_;
00047 }
00048 
00049 ACE_INLINE
00050 const OpenDDS::DCPS::DataSampleElement*
00051 OpenDDS::DCPS::TransportSendElement::sample() const
00052 {
00053   return this->element_;
00054 }

Generated on Fri Feb 12 20:05:28 2016 for OpenDDS by  doxygen 1.4.7