TSDuck v3.40-4120
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsNames.h File Reference

Conversion between names and identifiers. More...

Classes

struct  ts::EnableBitMaskOperators< ts::NamesFlags >
 Template specialization on type ts::NamesFlags
More...
 
class  ts::Names
 Representation of a set of translations between names for identifiers. More...
 
struct  ts::Names::NameValue
 A structure used in the constructor of a Names instance. More...
 
class  ts::Names::RegisterExtensionFile
 A class to register additional names files to merge with the TSDuck names file. More...
 
class  ts::Names::Visitor
 A visitor interface class to be implemented by applications needing ranges of values. More...
 

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Macros

#define TS_REGISTER_NAMES_FILE(filename)
 Registration of an extension ".names" file.
 

Typedefs

using ts::NamesPtr = std::shared_ptr< Names >
 Safe pointer for Names.
 

Enumerations

enum class  ts::NamesFlags : uint16_t {
  ts::NamesFlags::NAME = 0x0000 ,
  ts::NamesFlags::NAME_VALUE = 0x0001 ,
  ts::NamesFlags::VALUE_NAME = 0x0002 ,
  ts::NamesFlags::HEXA = 0x0004 ,
  ts::NamesFlags::DECIMAL = 0x0008 ,
  ts::NamesFlags::ALTERNATE = 0x0010 ,
  ts::NamesFlags::NAME_OR_VALUE = 0x0020 ,
  ts::NamesFlags::NO_UNKNOWN = 0x0040 ,
  ts::NamesFlags::HEX_DEC = HEXA | DECIMAL ,
  ts::NamesFlags::HEX_VALUE_NAME = VALUE_NAME | HEXA ,
  ts::NamesFlags::DEC_VALUE_NAME = VALUE_NAME | DECIMAL ,
  ts::NamesFlags::HEX_DEC_VALUE_NAME = VALUE_NAME | HEXA | DECIMAL
}
 Flags to be used in the formating of names using class Names. More...
 

Functions

template<typename T1 , typename T2 = Names::uint_t>
requires ts::int_enum<T1> && ts::int_enum<T2>
UString ts::NameFromSection (const UString &file_name, const UString &section_name, T1 value, NamesFlags flags=NamesFlags::NAME, T2 alternate_value=0, size_t bits=0)
 Get a fully formatted name from a specified section of a ".names" file.
 
template<typename T1 , typename T2 , typename T3 = Names::uint_t>
requires ts::int_enum<T1> && ts::int_enum<T2> && ts::int_enum<T3>
UString ts::NameFromSectionWithFallback (const UString &file_name, const UString &section_name, T1 value1, T2 value2, NamesFlags flags=NamesFlags::NAME, T3 alternate_value=0, size_t bits=0)
 Get a fully formatted name from a specified section of a ".names" file, with alternate fallback value.
 

Detailed Description

Conversion between names and identifiers.

Macro Definition Documentation

◆ TS_REGISTER_NAMES_FILE

#define TS_REGISTER_NAMES_FILE (   filename)

Registration of an extension ".names" file.

This macro is typically used in the .cpp file of a TSDuck extension.

Parameters
filenameName of a .names file. If the name does not include a directory, the file is searched in the default configuration directories of TSDuck.
See also
SearchConfigurationFile()