glbarcode++
 
Loading...
Searching...
No Matches
glbarcode::Factory Class Reference

#include </home/evins/glbarcode/glbarcode/Factory.hpp>

Public Types

using BarcodeCreateFct = Barcode *(*)()
 

Static Public Member Functions

static void init ()
 
static BarcodecreateBarcode (const std::string &typeId)
 
static void registerType (const std::string &typeId, BarcodeCreateFct fct)
 
static bool isTypeSupported (const std::string &typeId)
 
static TypeIdList getSupportedTypes ()
 

Detailed Description

Singleton Barcode factory class.

Member Typedef Documentation

◆ BarcodeCreateFct

Barcode creation function signature.

Member Function Documentation

◆ createBarcode()

static Barcode * glbarcode::Factory::createBarcode ( const std::string &  typeId)
static

Create barcode based on type ID string.

Parameters
[in]typeIdBarcode type ID string

◆ getSupportedTypes()

static TypeIdList glbarcode::Factory::getSupportedTypes ( )
static

Get list of supported types.

◆ init()

static void glbarcode::Factory::init ( )
static

Initialize barcode factory.

Initializes the barcode factory and registers all built-in Barcode types. It is optional for an application to call init(), because glbarcode++ will automatically initialize the factory on demand.

◆ isTypeSupported()

static bool glbarcode::Factory::isTypeSupported ( const std::string &  typeId)
static

Is barcode type supported?

Parameters
[in]typeIdBarcode type ID string

◆ registerType()

static void glbarcode::Factory::registerType ( const std::string &  typeId,
BarcodeCreateFct  fct 
)
static

Register barcode type ID.

Parameters
[in]typeIdBarcode type ID string
[in]fctFunction to create barcode object of concrete Barcode class

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