19#ifndef FASTDDS_DDS_CORE__LOANABLESEQUENCE_HPP
20#define FASTDDS_DDS_CORE__LOANABLESEQUENCE_HPP
27#include <fastdds/dds/core/LoanableTypedCollection.hpp>
28#include <fastdds/dds/log/Log.hpp>
61template<
typename T,
typename _NonConstEnabler = std::true_type>
117 EPROSIMA_LOG_WARNING(SUBSCRIBER,
"Sequence destroyed with active loan");
171 *
static_cast<T*
>(
elements_[n]) = *
static_cast<const T*
>(other_buf[n]);
212 std::vector<T*>().swap(data_);
221 std::vector<T*> data_;
229#define FASTDDS_SEQUENCE(FooSeq, Foo) using FooSeq = eprosima::fastdds::dds::LoanableSequence<Foo>
230#define FASTDDS_CONST_SEQUENCE(FooSeq, Foo) using FooSeq = eprosima::fastdds::dds::LoanableSequence<Foo, \
bool has_ownership_
Definition LoanableCollection.hpp:243
size_type maximum_
Definition LoanableCollection.hpp:240
size_type maximum() const
Get the maximum number of elements currently allocated.
Definition LoanableCollection.hpp:68
int32_t size_type
Definition LoanableCollection.hpp:37
size_type length_
Definition LoanableCollection.hpp:241
element_type * elements_
Definition LoanableCollection.hpp:242
const element_type * buffer() const
Get the pointer to the elements buffer.
Definition LoanableCollection.hpp:48
size_type length() const
Get the number of elements currently accessible.
Definition LoanableCollection.hpp:78
void * element_type
Definition LoanableCollection.hpp:38
A type-safe, ordered collection of elements that can receive the buffer from outside (loan).
Definition LoanableSequence.hpp:63
LoanableSequence & operator=(const LoanableSequence &other)
Copy the contents of another sequence into this one.
Definition LoanableSequence.hpp:159
bool has_ownership_
Definition LoanableCollection.hpp:243
size_type maximum_
Definition LoanableCollection.hpp:240
LoanableSequence()=default
Default constructor.
LoanableSequence(const LoanableSequence &other)
Construct a sequence with the contents of another sequence.
Definition LoanableSequence.hpp:137
size_type length_
Definition LoanableCollection.hpp:241
~LoanableSequence()
Deallocate this sequence's buffer.
Definition LoanableSequence.hpp:113
LoanableCollection::element_type element_type
Definition LoanableSequence.hpp:67
element_type * elements_
Definition LoanableCollection.hpp:242
LoanableSequence(size_type max)
Pre-allocation constructor.
Definition LoanableSequence.hpp:95
LoanableCollection::size_type size_type
Definition LoanableSequence.hpp:66
A type-safe accessible collection of generic opaque pointers that can receive the buffer from outside...
Definition LoanableTypedCollection.hpp:40
Definition DomainParticipant.hpp:45