RtpsCustomizedElement.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 namespace OpenDDS {
00009 namespace DCPS {
00010 
00011 ACE_INLINE
00012 RtpsCustomizedElement::RtpsCustomizedElement(TransportQueueElement* orig,
00013                                              ACE_Message_Block* msg,
00014                                              ACE_Allocator* allocator)
00015   : TransportCustomizedElement(orig, false, allocator)
00016   , seq_(SequenceNumber::SEQUENCENUMBER_UNKNOWN())
00017 {
00018   set_requires_exclusive();
00019   set_msg(msg);
00020 }
00021 
00022 ACE_INLINE /*static*/
00023 RtpsCustomizedElement*
00024 RtpsCustomizedElement::alloc(TransportQueueElement* orig,
00025                              ACE_Message_Block* msg,
00026                              ACE_Allocator* allocator /* = 0 */)
00027 {
00028   if (allocator) {
00029     RtpsCustomizedElement* ret;
00030     ACE_NEW_MALLOC_RETURN(ret,
00031       static_cast<RtpsCustomizedElement*>(allocator->malloc(0)),
00032       RtpsCustomizedElement(orig, msg, allocator),
00033       0);
00034     return ret;
00035   } else {
00036     return new RtpsCustomizedElement(orig, msg, 0);
00037   }
00038 }
00039 
00040 ACE_INLINE
00041 SequenceNumber
00042 RtpsCustomizedElement::sequence() const
00043 {
00044   return (seq_ == SequenceNumber::SEQUENCENUMBER_UNKNOWN()) ?
00045     TransportCustomizedElement::sequence() : seq_;
00046 }
00047 
00048 ACE_INLINE
00049 SequenceNumber
00050 RtpsCustomizedElement::last_fragment() const
00051 {
00052   return last_frag_;
00053 }
00054 
00055 }
00056 }

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