Grok 20.3.2
grk::TLMMarkerManager Class Reference

Manages a collection of TLM markers, assuming strictly increasing marker ids. More...

#include <TLMMarker.h>

Public Member Functions

 TLMMarkerManager ()
void push_back (TilePartLength< uint32_t > tilePartLength)
 Pushes a TilePartLength.
void reset () noexcept
 Resets the iterator state for traversing markers.
TilePartLength< uint32_t > * next (bool peek=false) noexcept
 Gets the next tile part length.
bool empty () const noexcept
 Checks if the manager contains no markers.
bool validateMarkerId (uint8_t markerId) noexcept
 Validates marker id.

Private Types

using TL_VEC = std::vector<TilePartLength<uint32_t>>
 vector of TilePartLength stored in sequence as they appear in the code stream

Private Attributes

std::unique_ptr< TL_VECtilePartLengths_
 Single TL_VEC storing all tile part lengths in order.
TL_VEC::iterator tilePartLengthsIter_
 Iterator into the single TLM tile lengths vector.
int32_t lastMarkerId_
 stores last valid marker id.
bool valid_
 Flag indicating if the manager is valid (i.e., marker ids are strictly increasing).

Detailed Description

Manages a collection of TLM markers, assuming strictly increasing marker ids.

Member Typedef Documentation

◆ TL_VEC

using grk::TLMMarkerManager::TL_VEC = std::vector<TilePartLength<uint32_t>>
private

vector of TilePartLength stored in sequence as they appear in the code stream

Constructor & Destructor Documentation

◆ TLMMarkerManager()

grk::TLMMarkerManager::TLMMarkerManager ( )
inline

Member Function Documentation

◆ empty()

bool grk::TLMMarkerManager::empty ( ) const
inlinenodiscardnoexcept

Checks if the manager contains no markers.

Returns
True if empty, false otherwise

References tilePartLengths_.

◆ next()

TilePartLength< uint32_t > * grk::TLMMarkerManager::next ( bool peek = false)
inlinenoexcept

Gets the next tile part length.

Parameters
peekIf true, do not advance to the next entry
Returns
Pointer to the next tile part, or nullptr if none or invalid

References tilePartLengths_, tilePartLengthsIter_, and valid_.

◆ push_back()

void grk::TLMMarkerManager::push_back ( TilePartLength< uint32_t > tilePartLength)
inline

Pushes a TilePartLength.

Parameters
tilePartLengthTile part information

References tilePartLengths_, tilePartLengthsIter_, and valid_.

◆ reset()

void grk::TLMMarkerManager::reset ( )
inlinenoexcept

Resets the iterator state for traversing markers.

References tilePartLengths_, and tilePartLengthsIter_.

◆ validateMarkerId()

bool grk::TLMMarkerManager::validateMarkerId ( uint8_t markerId)
inlinenodiscardnoexcept

Validates marker id.

Parameters
markerIdMarker index to check
Returns
True if the marker exists, false otherwise

References grk::grklog, lastMarkerId_, and valid_.

Member Data Documentation

◆ lastMarkerId_

int32_t grk::TLMMarkerManager::lastMarkerId_
private

stores last valid marker id.

Used to ensure stricly increasing ids

Referenced by TLMMarkerManager(), and validateMarkerId().

◆ tilePartLengths_

std::unique_ptr<TL_VEC> grk::TLMMarkerManager::tilePartLengths_
private

Single TL_VEC storing all tile part lengths in order.

Referenced by empty(), next(), push_back(), and reset().

◆ tilePartLengthsIter_

TL_VEC::iterator grk::TLMMarkerManager::tilePartLengthsIter_
private

Iterator into the single TLM tile lengths vector.

Referenced by next(), push_back(), reset(), and TLMMarkerManager().

◆ valid_

bool grk::TLMMarkerManager::valid_
private

Flag indicating if the manager is valid (i.e., marker ids are strictly increasing).

Referenced by next(), push_back(), TLMMarkerManager(), and validateMarkerId().


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