TSDuck v3.43-4426
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::Features::Register Class Reference

A class to register a feature of the application. More...

#include <tsFeatures.h>

Public Member Functions

 Register (const UString &option, const fs::path &library)
 Register a feature which is in another shared image.
 
 Register (const UString &option, const UString &name, Support support, GetVersionFunc get_version)
 Register a feature.
 

Detailed Description

A class to register a feature of the application.

The registration is performed using constructors. Thus, it is possible to perform a registration in the declaration of a static object.

Constructor & Destructor Documentation

◆ Register() [1/2]

ts::Features::Register::Register ( const UString option,
const UString name,
Support  support,
GetVersionFunc  get_version 
)
inline

Register a feature.

Parameters
[in]optionFeature name as used in command line options.
[in]nameFeature name as used on display.
[in]supportLevel of support.
[in]get_versionFunction returning the version of the feature. Can be null (no identified version).

◆ Register() [2/2]

ts::Features::Register::Register ( const UString option,
const fs::path &  library 
)
inline

Register a feature which is in another shared image.

If a feature with the same option name is already registered, do nothing. Otherwise, the library name is stored for later usage. The first time the feature is searched, the shared library is loaded. If the load succeeds and the initialization of the shared image registered a feature with the same name, the feature becomes defined. Otherwise, the feature is definitely marked as unsupported.

Parameters
[in]optionFeature name as used in command line options.
[in]libraryName of a shared image (typically without directory).

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