Struct UserAllocatedSequence

Inheritance Relationships

Base Type

Struct Documentation

struct UserAllocatedSequence : public eprosima::fastdds::dds::LoanableCollection

A collection of generic opaque pointers allocated by the user.

This kind of collection would always return true for has_ownership(), and thus would not be able to receive loans. It would also have an inmutable maximum(), so it would not allow length() to grow beyond the maximum value indicated on construction.

Public Types

using size_type = LoanableCollection::size_type
using element_type = LoanableCollection::element_type

Public Functions

inline UserAllocatedSequence(element_type *items, size_type num_items)

Construct a UserAllocatedSequence.

Parameters:
  • items[in] Pointer to the beginning of an array of num_items opaque pointers.

  • num_items[in] Number of opaque pointers in items.

Post:

buffer() == items

Post:

has_ownership() == true

Post:

length() == 0

Post:

maximum() == num_items

~UserAllocatedSequence() = default
UserAllocatedSequence(const UserAllocatedSequence&) = delete
UserAllocatedSequence &operator=(const UserAllocatedSequence&) = delete
UserAllocatedSequence(UserAllocatedSequence&&) = delete
UserAllocatedSequence &operator=(UserAllocatedSequence&&) = delete

Protected Functions

inline virtual void resize(size_type new_length) override

Protected Attributes

size_type maximum_
size_type length_
element_type *elements_
bool has_ownership_