CVB++ 15.0
Loading...
Searching...
No Matches
UpcEanBase< T > Class Template Referenceabstract

Base configuration class for UPC-A, UPC-E, EAN-8, and EAN-13 barcodes. More...

#include <cvb/config.hpp>

Inherits CompositeCodeBase< T >.

Public Member Functions

virtual T & EnableCCA () override
 Enables Composite Component A (CC-A) decoding.
 
virtual T & DisableCCA () override
 Disables Composite Component A (CC-A) decoding.
 
virtual T & EnableCCB () override
 Enables Composite Component B (CC-B) decoding.
 
virtual T & DisableCCB () override
 Disables Composite Component B (CC-B) decoding.
 
virtual T & EnableCCC () override
 Enables Composite Component C (CC-C) decoding.
 
virtual T & DisableCCC () override
 Disables Composite Component C (CC-C) decoding.
 
virtual T & SetSupplemental (SupplementalCode supplement, bool required=false, bool addSpace=true)=0
 Configures supplemental code decoding.
 
virtual SupplementalCode Supplemental () const =0
 Retrieves the current configuration of the supplemental code decoding.
 
virtual T & SetStripCheckDigit (bool value)=0
 Enables or disables the removal of the check digit from read codes.
 
virtual bool StripCheckDigit () const =0
 Determines whether check digit removal is enabled.
 
- Public Member Functions inherited from CompositeCodeBase< T >
bool EnabledCCA () const
 Checks if CompositeComponent A (CC-A) decoding is enabled.
 
bool EnabledCCB () const
 Checks if CompositeComponent B (CC-B) decoding is enabled.
 
bool EnabledCCC () const
 Checks if CompositeComponent C (CC-C) decoding is enabled.
 
- Public Member Functions inherited from ConfigBase< T >
bool Enabled () const
 Checks if decoding for the code type represented by the derived class is enabled.
 
T & Enable ()
 Enables decoding for the code type represented by the derived class.
 
T & Disable ()
 Disables decoding for the code type represented by the derived class.
 

Detailed Description

template<class T>
class Cvb::CodeReader::Config::UpcEanBase< T >

Base configuration class for UPC-A, UPC-E, EAN-8, and EAN-13 barcodes.

UPC-A, UPC-E, EAN-8, and EAN-13 barcodes can serve as the 1D component of a composite code, too. A composite code combines a 1D barcode (such as UPC or EAN) with a 2D code, often to include additional information. To enable composite code decoding use function EnableCCA(), EnableCCB() or EnableCCC().

For specific configurations, refer to the following derived classes:

Template Parameters
TThe specific configuration class for the UPC ore EAN barcode type.

Member Function Documentation

◆ DisableCCA()

template<class T>
T & DisableCCA ( )
inlineoverridevirtual

Disables Composite Component A (CC-A) decoding.

Note
Disabling CC-A for one derived class of UpcEanBase automatically disables it for all UPC-E/A, EAN-8 and EAN-13 barcodes.
Returns
A reference to the current configuration object for method chaining.

Reimplemented from CompositeCodeBase< T >.

◆ DisableCCB()

template<class T>
T & DisableCCB ( )
inlineoverridevirtual

Disables Composite Component B (CC-B) decoding.

Note
Disabling CC-B for one derived class of UpcEanBase automatically disables it for all UPC-E/A, EAN-8 and EAN-13 barcodes.
Returns
A reference to the current configuration object for method chaining.

Reimplemented from CompositeCodeBase< T >.

◆ DisableCCC()

template<class T>
T & DisableCCC ( )
inlineoverridevirtual

Disables Composite Component C (CC-C) decoding.

Note
Disabling CC-C for one derived class of UpcEanBase automatically disables it for all UPC-E/A, EAN-8 and EAN-13 barcodes.
Returns
A reference to the current configuration object for method chaining.

Reimplemented from CompositeCodeBase< T >.

◆ EnableCCA()

template<class T>
T & EnableCCA ( )
inlineoverridevirtual

Enables Composite Component A (CC-A) decoding.

Attention
Enabling CC-A for one derived class of UpcEanBase automatically enables it for all UPC-E/A, EAN-8 and EAN-13 barcodes. Furthermore, when this option is enabled, the presence of a composite component becomes mandatory. Single UPC or EAN barcodes without a composite component will no longer be detected.
Returns
A reference to the current configuration object for method chaining.

Reimplemented from CompositeCodeBase< T >.

◆ EnableCCB()

template<class T>
T & EnableCCB ( )
inlineoverridevirtual

Enables Composite Component B (CC-B) decoding.

Attention
Enabling CC-B for one derived class of UpcEanBase automatically enables it for all UPC-E/A, EAN-8 and EAN-13 barcodes. Furthermore, when this option is enabled, the presence of a composite component becomes mandatory. Single UPC or EAN barcodes without a composite component will no longer be detected.
Returns
A reference to the current configuration object for method chaining.

Reimplemented from CompositeCodeBase< T >.

◆ EnableCCC()

template<class T>
T & EnableCCC ( )
inlineoverridevirtual

Enables Composite Component C (CC-C) decoding.

Attention
Enabling CC-C for one derived class of UpcEanBase automatically enables it for all UPC-E/A, EAN-8 and EAN-13 barcodes. Furthermore, when this option is enabled, the presence of a composite component becomes mandatory. Single UPC or EAN barcodes without a composite component will no longer be detected.
Returns
A reference to the current configuration object for method chaining.

Reimplemented from CompositeCodeBase< T >.

◆ SetStripCheckDigit()

template<class T>
virtual T & SetStripCheckDigit ( bool value)
pure virtual

Enables or disables the removal of the check digit from read codes.

Parameters
valueSet to true to enable check digit removal, or false to keep the check digit.
Returns
A reference to the current configuration object for method chaining.

Implemented in Ean13, Ean8, UpcA, and UpcE.

◆ SetSupplemental()

template<class T>
virtual T & SetSupplemental ( SupplementalCode supplement,
bool required = false,
bool addSpace = true )
pure virtual

Configures supplemental code decoding.

Parameters
supplementSpecifies the type of supplemental code to decode.
requiredIf set to true, the code will not be decoded unless both the code and the supplemental code are successfully decoded. If false, decoding the main code does not require the presence of a supplemental code.
addSpaceEnables or disables adding a space character between the code and the supplemental code.
Returns
A reference to the current configuration object for method chaining.

Implemented in Ean13, Ean8, UpcA, and UpcE.

◆ StripCheckDigit()

template<class T>
virtual bool StripCheckDigit ( ) const
pure virtual

Determines whether check digit removal is enabled.

Returns
true if check digit removal is enabled, false otherwise.

Implemented in Ean13, Ean8, UpcA, and UpcE.

◆ Supplemental()

template<class T>
virtual SupplementalCode Supplemental ( ) const
pure virtual

Retrieves the current configuration of the supplemental code decoding.

Returns
The configured supplemental code decoding mode.

Implemented in Ean13, Ean8, UpcA, and UpcE.