6 #ifndef OPENDDS_DCPS_ZEROCOPYSEQ_T_H 7 #define OPENDDS_DCPS_ZEROCOPYSEQ_T_H 9 #include <ace/config-macros.h> 10 #ifndef ACE_LACKS_PRAGMA_ONCE 25 class ReceivedDataElement;
52 template <
class Sample_T,
size_t DEF_MAX = DCPS_ZERO_COPY_SEQ_DEFAULT_SIZE>
106 const Sample_T* get_buffer()
const;
109 static void freebuf(Sample_T* buffer);
111 void increment_references();
120 return seq_.max_slots();
124 seq_.internal_set_length(len);
128 seq_.set_loaner(loaner);
132 seq_.assign_ptr(ii, item);
136 return seq_.get_ptr(ii);
140 seq_.assign_sample(ii, sample);
160 :
public ACE_Vector<OpenDDS::DCPS::ReceivedDataElement*, DEF_MAX> {
167 using BASE::allocator_;
189 void assign_sample(
CORBA::ULong ii,
const Sample_T& sample);
191 bool is_zero_copy()
const;
221 #if defined (__ACE_INLINE__) 225 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 229 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 230 #pragma message ("ZeroCopySeq_T.cpp template inst") 231 #pragma implementation ("ZeroCopySeq_T.cpp") void set_loaner(::OpenDDS::DCPS::DataReaderImpl *loaner)
void swap(MessageBlock &lhs, MessageBlock &rhs)
CORBA::Boolean sc_release_
#define TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ZeroCopyVector Ptr_Seq_Type
void internal_set_length(CORBA::ULong len)
Ptr_Seq_Type ptrs_
array of pointers if the sequence is supporting zero-copy reads
OpenDDS::DCPS::DataReaderImpl * loaner_
The loaner that loaned its samples.
PrivateMemberAccess(ZeroCopyDataSeq &seq)
Implements the DDS::DataReader interface.
CORBA::ULong max_slots() const
void assign_ptr(CORBA::ULong ii, OpenDDS::DCPS::ReceivedDataElement *item)
void assign_sample(CORBA::ULong ii, const Sample_T &sample)
ACE_Vector< OpenDDS::DCPS::ReceivedDataElement *, DEF_MAX > BASE
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
OpenDDS::DCPS::ReceivedDataElement * get_ptr(CORBA::ULong ii) const
void increment_references()
#define TAO_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Only used by the FooDataReaderImpl and tests.
OpenDDS::DCPS::FirstTimeFastAllocator< OpenDDS::DCPS::ReceivedDataElement *, DEF_MAX > default_allocator_
the default allocator