Safe DDS
eprosima::safedds::memory::IList< V > Interface Template Referenceabstract

List-like data structure. More...

#include <IList.hpp>

Public Member Functions

virtual V * at (uint32_t pos) noexcept=0
 Get element of given index. More...
 
virtual const V * at (uint32_t pos) const noexcept=0
 Get element of given index. More...
 
virtual bool add (const V &value) noexcept=0
 Push back a new element. More...
 
virtual void remove_position (uint32_t pos) noexcept=0
 Remove element of given position. More...
 
virtual V * insert (uint32_t pos) noexcept=0
 Insert element on a given position. More...
 
- Public Member Functions inherited from eprosima::safedds::memory::IContainerBase
virtual uint32_t capacity () const noexcept=0
 Max capacity of the container. More...
 
virtual uint32_t size () const noexcept=0
 Used size of the container. More...
 
virtual void clear () noexcept=0
 Remove all elements from the container. More...
 

Protected Member Functions

 ~IList () noexcept=default
 Protected destructor ownership defined on creation. More...
 
 IList () noexcept=default
 Default creation. More...
 
 IList (const IList &) noexcept=default
 Default deleted. More...
 
 IList (IList &&) noexcept=default
 Default deleted. More...
 
IListoperator= (const IList &) noexcept=default
 Copy operator allowed. More...
 
IListoperator= (IList &&) noexcept=default
 Movement operator allowed. More...
 
- Protected Member Functions inherited from eprosima::safedds::memory::IContainerBase
 ~IContainerBase () noexcept=default
 Protected destructor ownership defined on creation. More...
 
 IContainerBase () noexcept=default
 Default creation. More...
 
 IContainerBase (const IContainerBase &) noexcept=default
 Copy allowed. More...
 
 IContainerBase (IContainerBase &&) noexcept=default
 Movement allowed. More...
 
IContainerBaseoperator= (const IContainerBase &) noexcept=default
 Copy operator deleted. More...
 
IContainerBaseoperator= (IContainerBase &&) noexcept=default
 Movement operator deleted. More...
 

Detailed Description

template<typename V>
interface eprosima::safedds::memory::IList< V >

List-like data structure.

Constructor & Destructor Documentation

◆ ~IList()

template<typename V >
eprosima::safedds::memory::IList< V >::~IList ( )
protecteddefaultnoexcept

Protected destructor ownership defined on creation.

◆ IList() [1/3]

template<typename V >
eprosima::safedds::memory::IList< V >::IList ( )
protecteddefaultnoexcept

Default creation.

◆ IList() [2/3]

template<typename V >
eprosima::safedds::memory::IList< V >::IList ( const IList< V > &  )
protecteddefaultnoexcept

Default deleted.

◆ IList() [3/3]

template<typename V >
eprosima::safedds::memory::IList< V >::IList ( IList< V > &&  )
protecteddefaultnoexcept

Default deleted.

Member Function Documentation

◆ add()

template<typename V >
virtual bool eprosima::safedds::memory::IList< V >::add ( const V &  value)
pure virtualnoexcept

Push back a new element.

Parameters
valuevalue to add to the list.
Returns
true if OK.

Implemented in eprosima::safedds::memory::container::StaticList< T, N >, and eprosima::safedds::memory::container::PreallocList< T >.

◆ at() [1/2]

template<typename V >
virtual const V* eprosima::safedds::memory::IList< V >::at ( uint32_t  pos) const
pure virtualnoexcept

◆ at() [2/2]

template<typename V >
virtual V* eprosima::safedds::memory::IList< V >::at ( uint32_t  pos)
pure virtualnoexcept

◆ insert()

template<typename V >
virtual V* eprosima::safedds::memory::IList< V >::insert ( uint32_t  pos)
pure virtualnoexcept

Insert element on a given position.

Insert an element on the given position displacing the rest of the elements one position to the right.

Parameters
posposition index.
Returns
pointer to V.

Implemented in eprosima::safedds::memory::container::StaticList< T, N >, eprosima::safedds::memory::container::StaticList< BaseDataReaderInstance::InstanceSample, MaxSamplesPerInstance >, and eprosima::safedds::memory::container::PreallocList< T >.

◆ operator=() [1/2]

template<typename V >
IList& eprosima::safedds::memory::IList< V >::operator= ( const IList< V > &  )
protecteddefaultnoexcept

Copy operator allowed.

Returns
IList&.

◆ operator=() [2/2]

template<typename V >
IList& eprosima::safedds::memory::IList< V >::operator= ( IList< V > &&  )
protecteddefaultnoexcept

Movement operator allowed.

Returns
IList&.

◆ remove_position()

template<typename V >
virtual void eprosima::safedds::memory::IList< V >::remove_position ( uint32_t  pos)
pure virtualnoexcept

The documentation for this interface was generated from the following file: