GS1 Barcode Syntax Engine — C / C++ API
Library for processing GS1 Application Identifier syntax
Public Member Functions | Friends
gs1encoders::InitOpts Struct Reference

Initialisation options for the gs1encoders::GS1Encoder constructor. More...

#include <gs1encoders.hpp>

Public Member Functions

InitOptssyntax_dictionary (std::string path)
 Set the path to a GS1 Syntax Dictionary file. If not set, the embedded AI table is used.
 
InitOptsfallback_on_syndict_error (bool enabled)
 Fall back to the embedded AI table if the Syntax Dictionary cannot be loaded. When enabled, the underlying load error is exposed via gs1encoders::GS1Encoder::init_fallback_warning() on successful construction.
 
InitOptsno_embedded (bool enabled)
 Refuse to use the embedded AI table. Initialisation fails if no other AI table can be loaded.
 

Friends

class GS1Encoder
 

Detailed Description

Initialisation options for the gs1encoders::GS1Encoder constructor.

Populated via the chained setters, then passed to the gs1encoders::GS1Encoder constructor. New setters may be added in future versions without breaking existing code.

Member Function Documentation

◆ fallback_on_syndict_error()

InitOpts & gs1encoders::InitOpts::fallback_on_syndict_error ( bool  enabled)
inline

Fall back to the embedded AI table if the Syntax Dictionary cannot be loaded. When enabled, the underlying load error is exposed via gs1encoders::GS1Encoder::init_fallback_warning() on successful construction.

Parameters
enabledwhether to enable fallback.
Returns
reference to this InitOpts, for chaining.

◆ no_embedded()

InitOpts & gs1encoders::InitOpts::no_embedded ( bool  enabled)
inline

Refuse to use the embedded AI table. Initialisation fails if no other AI table can be loaded.

Parameters
enabledwhether to disable the embedded AI table.
Returns
reference to this InitOpts, for chaining.

◆ syntax_dictionary()

InitOpts & gs1encoders::InitOpts::syntax_dictionary ( std::string  path)
inline

Set the path to a GS1 Syntax Dictionary file. If not set, the embedded AI table is used.

Parameters
pathpath to the Syntax Dictionary file.
Returns
reference to this InitOpts, for chaining.

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