19 #ifndef FASTDDS_DDS_CORE__LOANABLECOLLECTION_HPP
20 #define FASTDDS_DDS_CORE__LOANABLECOLLECTION_HPP
155 if ((
nullptr ==
buffer) || (new_maximum < new_length) || (new_maximum < 1))
A collection of generic opaque pointers that can receive the buffer from outside (loan).
Definition: LoanableCollection.hpp:34
virtual void resize(size_type new_length)=0
bool has_ownership_
Definition: LoanableCollection.hpp:243
LoanableCollection()=default
Default constructor.
size_type maximum_
Definition: LoanableCollection.hpp:240
element_type * unloan(size_type &maximum, size_type &length)
Remove the loan from the collection.
Definition: LoanableCollection.hpp:183
const element_type * buffer() const
Get the pointer to the elements buffer.
Definition: LoanableCollection.hpp:48
size_type maximum() const
Get the maximum number of elements currently allocated.
Definition: LoanableCollection.hpp:68
bool length(size_type new_length)
Set the number of elements currently accessible.
Definition: LoanableCollection.hpp:101
int32_t size_type
Definition: LoanableCollection.hpp:37
size_type length_
Definition: LoanableCollection.hpp:241
bool loan(element_type *buffer, size_type new_maximum, size_type new_length)
Loan a buffer to the collection.
Definition: LoanableCollection.hpp:145
element_type * elements_
Definition: LoanableCollection.hpp:242
size_type length() const
Get the number of elements currently accessible.
Definition: LoanableCollection.hpp:78
void * element_type
Definition: LoanableCollection.hpp:38
element_type * unloan()
Remove the loan from the collection.
Definition: LoanableCollection.hpp:217
bool has_ownership() const
Get the ownership flag.
Definition: LoanableCollection.hpp:58
Definition: DomainParticipant.hpp:46