8 #ifndef OPENDDS_DCPS_ZEROCOPYSEQ_T_CPP 9 #define OPENDDS_DCPS_ZEROCOPYSEQ_T_CPP 11 #if !defined (ACE_LACKS_PRAGMA_ONCE) 17 #if !defined (__ACE_INLINE__) 26 template <
class Sample_T,
size_t DEF_MAX>
29 template <
class Sample_T,
size_t DEF_MAX>
32 : loaner_(frm.loaner_)
33 , ptrs_(frm.ptrs_.size(),
34 (frm.ptrs_.allocator_ ==
39 , sc_maximum_(frm.sc_maximum_)
41 , sc_buffer_(frm.sc_maximum_ ? allocbuf(frm.sc_maximum_) : 0)
42 , sc_release_(frm.sc_maximum_)
48 for (
size_t ii = 0; ii < frm.
ptrs_.
size(); ++ii) {
50 ++
ptrs_[ii]->zero_copy_cnt_;
61 #if defined (_MSC_VER) 62 #pragma warning (disable:4996) //std::copy OK here 64 template <
class Sample_T,
size_t DEF_MAX>
72 if (length == this->
length()) {
84 for (
size_t i(length); i <
ptrs_.
size(); ++i) {
85 --
ptrs_[i]->zero_copy_cnt_;
121 #if defined (_MSC_VER) 122 #pragma warning (default:4996) 125 template <
class Sample_T,
size_t DEF_MAX>
154 #if defined (_MSC_VER) 155 #pragma warning (default:4996) 158 template <
class Sample_T,
size_t DEF_MAX>
162 for (
size_t ii = 0; ii <
ptrs_.
size(); ++ii) {
163 ptrs_[ii]->inc_ref();
CORBA::Boolean sc_release_
#define TAO_BEGIN_VERSIONED_NAMESPACE_DECL
void increment_references()
CORBA::ULong length() const
bool is_zero_copy() const
CORBA::ULong max_slots() const
Ptr_Seq_Type ptrs_
array of pointers if the sequence is supporting zero-copy reads
void swap(ZeroCopyDataSeq &frm)
OpenDDS::DCPS::DataReaderImpl * loaner_
The loaner that loaned its samples.
void make_single_copy(CORBA::ULong maximum)
static Sample_T * allocbuf(CORBA::ULong nelems)
Seq::size_type grow(Seq &seq)
const Sample_T * get_buffer() const
ZeroCopyDataSeq(CORBA::ULong maximum=0, CORBA::ULong init_size=DEF_MAX, ACE_Allocator *alloc=0)
DDS::ReturnCode_t copy(DDS::DynamicData_ptr dest, DDS::DynamicData_ptr src)
#define TAO_END_VERSIONED_NAMESPACE_DECL
void resize(const size_t new_size, const T &t)
void set_loaner(OpenDDS::DCPS::DataReaderImpl *loaner)