Template Class LoanableTypedCollection

Inheritance Relationships

Base Type

Derived Types

Class Documentation

template<typename T, typename _NonConstEnabler = std::true_type>
class LoanableTypedCollection : public eprosima::fastdds::dds::LoanableCollection

A type-safe accessible collection of generic opaque pointers that can receive the buffer from outside (loan).

This is an abstract class. See LoanableSequence for details.

Subclassed by eprosima::fastdds::dds::LoanableSequence< T, _NonConstEnabler >, eprosima::fastdds::dds::StackAllocatedSequence< T, num_items >

Public Functions

template<typename Enabler = _NonConstEnabler>
inline std::enable_if<Enabler::value, T>::type &operator[](size_type n)

Set an element of the sequence.

This is the operator that is invoked when the application indexes into a non-const sequence:

element = sequence[n];
sequence[n] = element;

Note that a reference to the element is returned (and not a copy)

Parameters:

n[in] index of element to access, must be >= 0 and less than length().

Returns:

a reference to the element at position n

inline const T &operator[](size_type n) const

Get an element of the sequence.

This is the operator that is invoked when the application indexes into a const sequence:

element = sequence[n];

Note that a reference to the element is returned (and not a copy)

Parameters:

n[in] index of element to access, must be >= 0 and less than length().

Returns:

a const reference to the element at position