CVB.Net 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...

Inherits CompositeCodeBase< T >.

Inherited by Ean13, Ean8, UpcA, and UpcE.

Public Member Functions

SetSupplemental (SupplementalCode supplement, bool required=false, bool addSpace=true)
 Configures supplemental code decoding.
 
SupplementalCode GetSupplemental ()
 Retrieves the current configuration of the supplemental code decoding.
 
SetStripCheckDigitEnabled (bool enabled)
 Sets the strip check digit enable.
 
- Public Member Functions inherited from CompositeCodeBase< T >
CompositeCodeBase< T > SetCCAEnabled (bool enable)
 Sets value for IsCCAEnabled.
 
CompositeCodeBase< T > SetCCBEnabled (bool enable)
 Sets value for IsCCBEnabled.
 
CompositeCodeBase< T > SetCCCEnabled (bool enable)
 Sets value for IsCCCEnabled.
 
- Public Member Functions inherited from ConfigBase< T >
SetEnabled (bool enabled)
 Sets value for IsEnabled.
 

Properties

bool IsStripCheckDigitEnabled [get, set]
 Gets or sets a value indicating whether the strip check digit is enabled.
 
bool IsAddSpaceEnabled [get, set]
 Gets or sets a value indicating whether add space is enabled.
 
bool IsSupplementalRequiredEnabled [get, set]
 Gets or sets a value indicating whether a supplemental code is required.
 
SupplementalCode SupplementalCode [get, set]
 Gets or sets the supplemental code.
 
- Properties inherited from CompositeCodeBase< T >
virtual bool IsCCAEnabled [get, set]
 Enable/disable CCA.
 
virtual bool IsCCBEnabled [get, set]
 Enable/disable CCB.
 
virtual bool IsCCCEnabled [get, set]
 Enable/disable CCC.
 
- Properties inherited from ConfigBase
virtual bool IsEnabled [get, set]
 The enabled state of this symbology.
 
Decoder Decoder [get]
 Decoder this config belongs to.
 

Detailed Description

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 SetCCAEnabled, SetCCBEnabled and SetCCCEnabled.

For specific configurations, refer to the following derived classes:

Attention
Enabling composite codes (CC-A, CC-B or 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 codes without a composite component will no longer be detected.
Template Parameters
TThe specific configuration class for the UPC ore EAN barcode type.
Type Constraints
T :CompositeCodeBase<T> 

Member Function Documentation

◆ GetSupplemental()

SupplementalCode GetSupplemental ( )

Retrieves the current configuration of the supplemental code decoding.

Returns
The configured supplemental code decoding mode.

◆ SetStripCheckDigitEnabled()

T SetStripCheckDigitEnabled ( bool enabled)

Sets the strip check digit enable.

Parameters
enabledif set to true [enabled].
Returns

◆ SetSupplemental()

T SetSupplemental ( SupplementalCode supplement,
bool required = false,
bool addSpace = true )

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.

Property Documentation

◆ IsAddSpaceEnabled

bool IsAddSpaceEnabled
getset

Gets or sets a value indicating whether add space is enabled.

true if add space is enabled; otherwise, false.

◆ IsStripCheckDigitEnabled

bool IsStripCheckDigitEnabled
getset

Gets or sets a value indicating whether the strip check digit is enabled.

true if strip check digit is enabled; otherwise, false.

◆ IsSupplementalRequiredEnabled

bool IsSupplementalRequiredEnabled
getset

Gets or sets a value indicating whether a supplemental code is required.

true if a supplemental code is required; otherwise, false.

◆ SupplementalCode

Gets or sets the supplemental code.

The supplemental code.

Exceptions
System.ArgumentOutOfRangeExceptionvalue - null