TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::AbstractTable::AttachedEntryList< ENTRY > Class Template Reference

#include <tsAbstractTable.h>

Inheritance diagram for ts::AbstractTable::AttachedEntryList< ENTRY >:
Collaboration diagram for ts::AbstractTable::AttachedEntryList< ENTRY >:

Public Types

using SuperClass = AttachedEntryMap<size_t, ENTRY>

Public Member Functions

 AttachedEntryList (const AbstractTable *table)
 AttachedEntryList (const AbstractTable *table, AttachedEntryList &&other)
 AttachedEntryList (const AbstractTable *table, const SuperClass &other)
void getOrder (std::vector< size_t > &order) const
bool hasTable () const
ENTRY & newEntry ()
size_t nextIndex () const
size_t nextOrder () const
AttachedEntryList & operator= (AttachedEntryList &&other)
AttachedEntryList & operator= (const AttachedEntryList &other)
ENTRY & operator[] (const size_t &key)
const ENTRY & operator[] (const size_t &key) const
void setOrder (const std::vector< size_t > &order)
void swap (AttachedEntryMap &other)
const AbstractTable * table () const
TID tableId () const
Standards tableStandards () const

Detailed Description

template<class ENTRY>
requires std::derived_from<ENTRY, AttachedEntry>
class ts::AbstractTable::AttachedEntryList< ENTRY >

Template map of subclasses of AttachedEntry, indexed by size_t. This is replacement for vectors and lists, which cannot be used by entries containing a descriptor list since it is not CopyAssignable or CopyConstructible.

Template Parameters
ENTRYA subclass of AttachedEntry (enforced at compile-time).

Member Typedef Documentation

◆ SuperClass

template<class ENTRY>
using ts::AbstractTable::AttachedEntryList< ENTRY >::SuperClass = AttachedEntryMap<size_t, ENTRY>

Explicit reference to the super class.

Constructor & Destructor Documentation

◆ AttachedEntryList() [1/3]

template<class ENTRY>
ts::AbstractTable::AttachedEntryList< ENTRY >::AttachedEntryList ( const AbstractTable * table)
inlineexplicit

Basic constructor.

Parameters
[in]tableParent table. A descriptor list is always attached to a table.

◆ AttachedEntryList() [2/3]

template<class ENTRY>
ts::AbstractTable::AttachedEntryList< ENTRY >::AttachedEntryList ( const AbstractTable * table,
const SuperClass & other )
inline

Basic copy-like constructor.

Parameters
[in]tableParent table. A descriptor list is always attached to a table.
[in]otherAnother instance to copy.

◆ AttachedEntryList() [3/3]

template<class ENTRY>
ts::AbstractTable::AttachedEntryList< ENTRY >::AttachedEntryList ( const AbstractTable * table,
AttachedEntryList< ENTRY > && other )
inline

Basic move-like constructor.

Parameters
[in]tableParent table. A descriptor list is always attached to a table.
[in,out]otherAnother instance to move.

Member Function Documentation

◆ operator=() [1/2]

template<class ENTRY>
AttachedEntryList & ts::AbstractTable::AttachedEntryList< ENTRY >::operator= ( const AttachedEntryList< ENTRY > & other)
inline

Assignment operator. The parent table remains unchanged.

Parameters
[in]otherAnother instance to copy.
Returns
A reference to this object.

◆ operator=() [2/2]

template<class ENTRY>
AttachedEntryList & ts::AbstractTable::AttachedEntryList< ENTRY >::operator= ( AttachedEntryList< ENTRY > && other)
inline

Move assignment operator. The parent table remains unchanged.

Parameters
[in,out]otherAnother instance to move.
Returns
A reference to this object.

◆ nextIndex()

template<class ENTRY>
size_t ts::AbstractTable::AttachedEntryList< ENTRY >::nextIndex ( ) const
inline

Get a new unused index, greater than the greatest entry.

Returns
A new unused index.

◆ newEntry()

template<class ENTRY>
ENTRY & ts::AbstractTable::AttachedEntryList< ENTRY >::newEntry ( )
inline

Create a new entry in the map.

Returns
A reference to the new entry.

◆ swap()

void ts::AbstractTable::AttachedEntryMap< size_t, ENTRY >::swap ( AttachedEntryMap< size_t, ENTRY > & other)
inherited

Swap two instances (override of std::list).

Parameters
[in,out]otherAnother instance to swap with the current object.

◆ operator[]() [1/2]

ENTRY & ts::AbstractTable::AttachedEntryMap< size_t, ENTRY >::operator[] ( const size_t & key)
inherited

Access or create an entry.

Parameters
[in]keyThe key of the entry to access.
Returns
A reference to the retrieved or created entry.

◆ operator[]() [2/2]

const ENTRY & ts::AbstractTable::AttachedEntryMap< size_t, ENTRY >::operator[] ( const size_t & key) const
inherited

Access an existing entry in a read-only map.

Parameters
[in]keyThe key of the entry to access.
Returns
A constant reference to the retrieved entry.
Exceptions
std::out_of_rangeWhen the entry does not exist.

◆ getOrder()

void ts::AbstractTable::AttachedEntryMap< size_t, ENTRY >::getOrder ( std::vector< size_t > & order) const
inherited

Get the insertion order of entries in the table. The result is based on the order_hint fields in the AttachedEntry structures.

Parameters
[out]orderOrder of entries by key in the table.

◆ setOrder()

void ts::AbstractTable::AttachedEntryMap< size_t, ENTRY >::setOrder ( const std::vector< size_t > & order)
inherited

Define the insertion order of entries in the table. This can be precisely set using the order_hint fields in the AttachedEntry structures. This method is a helper which sets these fields.

Parameters
[in]orderOrder of entries by key in the table.

◆ nextOrder()

size_t ts::AbstractTable::AttachedEntryMap< size_t, ENTRY >::nextOrder ( ) const
inherited

Get the next ordering hint to be used in an entry to make sure it is considered the last one.

Returns
The next ordering hint to be used.

◆ tableId()

TID ts::AbstractTableAttachment::tableId ( ) const
inherited

Get the table id of the parent table.

Returns
The table id of the parent table or TID_NULL if there is none.

◆ tableStandards()

Standards ts::AbstractTableAttachment::tableStandards ( ) const
inherited

Get the standards of the parent table.

Returns
The standards of the parent table or NONE if there is none.

◆ table()

const AbstractTable * ts::AbstractTableAttachment::table ( ) const
inlineinherited

Get the parent table.

Returns
The parent table or zero if there is none.

◆ hasTable()

bool ts::AbstractTableAttachment::hasTable ( ) const
inlineinherited

Check if this instance has a parent table.

Returns
True if there is one parent table.

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