![]() |
TSDuck v3.43-4441
MPEG Transport Stream Toolkit
|
Template map of subclasses of AttachedEntry. More...
#include <tsAbstractTable.h>
Public Types | |
using | SuperClass = std::map< KEY, ENTRY > |
Explicit reference to the super class. | |
Public Member Functions | |
AttachedEntryMap (const AbstractTable *table, AttachedEntryMap &&other) | |
Basic move-like constructor. | |
AttachedEntryMap (const AbstractTable *table, bool auto_ordering=false) | |
Basic constructor. | |
AttachedEntryMap (const AbstractTable *table, const AttachedEntryMap &other) | |
Basic copy-like constructor. | |
void | getOrder (std::vector< KEY > &order) const |
Get the insertion order of entries in the table. | |
bool | hasTable () const |
Check if this instance has a parent table. | |
size_t | nextOrder () const |
Get the next ordering hint to be used in an entry to make sure it is considered the last one. | |
AttachedEntryMap & | operator= (AttachedEntryMap &&other) |
Move assignment operator. | |
AttachedEntryMap & | operator= (const AttachedEntryMap &other) |
Assignment operator. | |
ENTRY & | operator[] (const KEY &key) |
Access or create an entry. | |
const ENTRY & | operator[] (const KEY &key) const |
Access an existing entry in a read-only map. | |
void | setOrder (const std::vector< KEY > &order) |
Define the insertion order of entries in the table. | |
void | swap (AttachedEntryMap &other) |
Swap two instances (override of std::list). | |
const AbstractTable * | table () const |
Get the parent table. | |
TID | tableId () const |
Get the table id of the parent table. | |
Standards | tableStandards () const |
Get the standards of the parent table. | |
Template map of subclasses of AttachedEntry.
KEY | A type which is used as key of the map. |
ENTRY | A subclass of AttachedEntry (enforced at compile-time). |
Implementation note: Because of a bug in MSVC, the full path of AttachedEntry must be specified in the "requires" directive.
|
explicit |
Basic constructor.
[in] | table | Parent table. A descriptor list is always attached to a table. |
[in] | auto_ordering | If true, each time an entry is added, its order_hint, if previously unset (meaning set to NPOS) is set to one higher than the highest order_hint in all entries. This ensures that the order of insertion is preserved, at the expense of a small performance penalty each time an entry is added. |
ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::AttachedEntryMap | ( | const AbstractTable * | table, |
const AttachedEntryMap< KEY, ENTRY > & | other | ||
) |
Basic copy-like constructor.
[in] | table | Parent table. A descriptor list is always attached to a table. |
[in] | other | Another instance to copy. |
ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::AttachedEntryMap | ( | const AbstractTable * | table, |
AttachedEntryMap< KEY, ENTRY > && | other | ||
) |
Basic move-like constructor.
[in] | table | Parent table. A descriptor list is always attached to a table. |
[in,out] | other | Another instance to move. |
ts::AbstractTable::AttachedEntryMap< KEY, ENTRY > & ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::operator= | ( | const AttachedEntryMap< KEY, ENTRY > & | other | ) |
Assignment operator.
The parent table remains unchanged.
[in] | other | Another instance to copy. |
ts::AbstractTable::AttachedEntryMap< KEY, ENTRY > & ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::operator= | ( | AttachedEntryMap< KEY, ENTRY > && | other | ) |
Move assignment operator.
The parent table remains unchanged.
[in,out] | other | Another instance to move. |
void ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::swap | ( | AttachedEntryMap< KEY, ENTRY > & | other | ) |
Swap two instances (override of std::list).
[in,out] | other | Another instance to swap with the current object. |
ENTRY & ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::operator[] | ( | const KEY & | key | ) |
Access or create an entry.
[in] | key | The key of the entry to access. |
const ENTRY & ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::operator[] | ( | const KEY & | key | ) | const |
Access an existing entry in a read-only map.
[in] | key | The key of the entry to access. |
std::out_of_range | When the entry does not exist. |
void ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::getOrder | ( | std::vector< KEY > & | order | ) | const |
Get the insertion order of entries in the table.
The result is based on the order_hint fields in the AttachedEntry structures.
[out] | order | Order of entries by key in the table. |
void ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::setOrder | ( | const std::vector< KEY > & | order | ) |
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.
[in] | order | Order of entries by key in the table. |
size_t ts::AbstractTable::AttachedEntryMap< KEY, ENTRY >::nextOrder | ( | ) | const |
Get the next ordering hint to be used in an entry to make sure it is considered the last one.
|
inherited |
Get the table id of the parent table.
|
inherited |
Get the standards of the parent table.
|
inlineinherited |
Get the parent table.
|
inlineinherited |
Check if this instance has a parent table.