SBSCode Class Reference

Inherits NSObject.

Inherited by SBSTrackedCode.

Properties

NSString * symbologyString
 
NSString * symbologyName
 
SBSSymbology symbology
 
NSString * data
 
NSData * rawData
 
BOOL isRecognized
 
SBSQuadrilateral location
 
BOOL isGs1DataCarrier
 
int symbolCount
 
SBSCompositeFlag compositeFlag
 
BOOL isColorInverted
 

Detailed Description

Represents a recognized/localized barcode/2D code.

The SBSCode class represents a barcode, or 2D code that has been localized or recognized by the barcode recognition engine.

Property Documentation

- (NSString*) symbologyString
readnonatomicassign

The symbology of the barcode as a string, including GS1 data carrier states.

Codes for which SBSCode::isRecognized is NO, "UNKNOWN" is returned.

- (NSString*) symbologyName
readnonatomicassign

The symbology name of the barcode as a string.

Returns
Lower-case symbology name. Codes for which SBSCode::isRecognized is NO, "unknown" is returned. In contrast to SBSCode::symbologyString, the returned symbology does not contain any information on whether the code is a GS1 data carrier, use SBSCode::isGs1DataCarrier for that.
Since
4.10.0
- (SBSSymbology) symbology
readnonatomicassign

Returns the symbology of a recognized barcode.

Codes for which SBSCode::isRecognized is NO return SBSSymbologyUnknown.

- (NSString*) data
readnonatomicassign

The data contained in the barcode/2D code, e.g. the 13 digit number of a EAN-13 code.

For some types of barcodes/2D codes (for example DATAMATRIX, AZTEC, PDF417), the data string may contain non-printable characters and nul-bytes in the middle of the string. SBSCode::data may be nil in these cases. Use SBSCode::rawData if your application scans these types of codes and you are expecting binary/non- printable data.

- (NSData*) rawData
readnonatomicassign

The raw byte data contained in the barcode.

Use this method in case you are encoding binary data in barcodes\2D codes that can not be represented as UTF-8 strings. For codes that are localized but not recognized, nil is returned.

- (BOOL) isRecognized
readnonatomicassign

Whether the code was completely recognized.

This property is true for barcodes that were completely recognized and false for codes that were localized but not recognized. For codes returned by SBSScanSession::newlyRecognizedCodes and SBSScanSession::allRecognizedCodes isRecognized always returns YES, for codes returned by SBSScanSession::newlyLocalizedCodes isRecognized always returns NO.

- (SBSQuadrilateral) location
readnonatomicassign

The location of the code in the image.

The location is returned as a a polygon with 4 corners. The corners are in the coordinate system of the raw preview image. In order to be displayed they must be transformed to the coordinate system of the view. The meaning of the values of topLeft, topRight etc is such that the topLeft point corresponds to the top-left corner of the barcode regardless of how it is oriented in the image.

See also
- convertPointToPickerCoordinates: (SBSBarcodePicker)
- (BOOL) isGs1DataCarrier
readnonatomicassign

Whether the code is a GS1 data carrier.

Returns
True if the code is a GS1 data carrier, false if not. False is returned for codes that have only been localized but not recognized.
Since
4.10.2
- (int) symbolCount
readnonatomicassign

The symbol count of this barcode.

Use this value to determine the symbol count of a particular barcode, e.g. to configure the active symbol counts. For localized, but not recognized barcodes as well as 2d codes this property is set to -1.

- (SBSCompositeFlag) compositeFlag
readnonatomicassign

Flag to hint whether the barcode is part of a composite code.

For barcodes that are localized but not recognized, SBSCompositeFlagUnknown is returned.

- (BOOL) isColorInverted
readnonatomicassign

Whether the scanned code is color inverted.

For codes that have been localized but nor recognized, this property is set to NO.

Since
5.5.0

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