TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::ZeroCopyVector Class Reference

Inheritance diagram for TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::ZeroCopyVector:
Inheritance graph
[legend]
Collaboration diagram for TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::ZeroCopyVector:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ACE_Vector
< OpenDDS::DCPS::ReceivedDataElement
*, DEF_MAX > 
BASE

Public Member Functions

 ZeroCopyVector (const size_t init_size=DEF_MAX, ACE_Allocator *alloc=0)
void swap (ZeroCopyVector &)

Detailed Description

template<class Sample_T, size_t DEF_MAX = DCPS_ZERO_COPY_SEQ_DEFAULT_SIZE>
class TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::ZeroCopyVector

In some versions of ACE, ACE_Vector doesn't have a working swap() function, so we have to provide our own.

This version also provides public access to the allocator_ member, something the ACE_Vector doesn't do

Definition at line 159 of file ZeroCopySeq_T.h.


Member Typedef Documentation

template<class Sample_T, size_t DEF_MAX = DCPS_ZERO_COPY_SEQ_DEFAULT_SIZE>
typedef ACE_Vector<OpenDDS::DCPS::ReceivedDataElement*, DEF_MAX> TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::ZeroCopyVector::BASE

Definition at line 166 of file ZeroCopySeq_T.h.


Constructor & Destructor Documentation

template<class Sample_T , size_t DEF_MAX>
ACE_INLINE TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::ZeroCopyVector::ZeroCopyVector ( const size_t  init_size = DEF_MAX,
ACE_Allocator alloc = 0 
) [inline]

Definition at line 22 of file ZeroCopySeq_T.inl.

00025   : ACE_Vector<OpenDDS::DCPS::ReceivedDataElement*, DEF_MAX> (init_size, alloc)
00026 {
00027 }


Member Function Documentation

template<class Sample_T , size_t DEF_MAX>
ACE_INLINE void TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::ZeroCopyVector::swap ( ZeroCopyVector rhs  )  [inline]

Reimplemented from ACE_Array_Base< T >.

Definition at line 31 of file ZeroCopySeq_T.inl.

References ACE_Vector< T, DEFAULT_SIZE >::curr_max_size_, ACE_Vector< OpenDDS::DCPS::ReceivedDataElement *, DEF_MAX >::curr_max_size_, ACE_Vector< T, DEFAULT_SIZE >::length_, and ACE_Vector< OpenDDS::DCPS::ReceivedDataElement *, DEF_MAX >::length_.

Referenced by TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::swap().

00032 {
00033   // Later versions of ACE do have a working ACE_Vector<T,MAX>::swap so we must
00034   // delegate up to ACE_Array<T> to get consistent swap behavior.
00035   ACE_Array<OpenDDS::DCPS::ReceivedDataElement*>::swap(rhs);
00036   std::swap(this->length_, rhs.length_);
00037   std::swap(this->curr_max_size_, rhs.curr_max_size_);
00038 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1