Skip to main content

dl::DecoderFactory

dl::DecoderFactory

Factory for creating ChannelDecoder instances by string key. More…

#include <DecoderFactory.hpp>

Public Functions

Name
std::unique_ptr< ChannelDecoder > create(std::string const & decoder_name)
Create a decoder instance by name.
std::vector< std::string > availableDecoders()
Get the list of all registered decoder names.

Detailed Description

class dl::DecoderFactory;

Factory for creating ChannelDecoder instances by string key.

Registered keys: [TensorToPoint2D](/api_generated/Classes/classdl_1_1TensorToPoint2D.md), [TensorToMask2D](/api_generated/Classes/classdl_1_1TensorToMask2D.md), [TensorToLine2D](/api_generated/Classes/classdl_1_1TensorToLine2D.md), [TensorToFeatureVector](/api_generated/Classes/classdl_1_1TensorToFeatureVector.md).

Public Functions Documentation

function create

static std::unique_ptr< ChannelDecoder > create(
    std::string const & decoder_name
)

Create a decoder instance by name.

Parameters:

  • decoder_name Factory key (e.g. "[TensorToMask2D](/api_generated/Classes/classdl_1_1TensorToMask2D.md)").

Return: Decoder instance, or [nullptr] if the name is not recognized.

function availableDecoders

static std::vector< std::string > availableDecoders()

Get the list of all registered decoder names.

Return: Names accepted by create (e.g. "[TensorToMask2D](/api_generated/Classes/classdl_1_1TensorToMask2D.md)", "[TensorToPoint2D](/api_generated/Classes/classdl_1_1TensorToPoint2D.md)").


Updated on 2026-11-13 at 20:25:42 +0000