Dev Center
Swift
Objective-C
Table of contents

DSDecodedBarcodeElement Class

The DSDecodedBarcodeElement class represents a decoded barcode element. It inherits from the DSRegionObjectElement class and provides additional functionality for retrieving information about the decoded barcode.

Definition

Assembly: DynamsoftBarcodeReader.framework

  • Objective-C
  • Swift
  1. @interface DSDecodedBarcodeElement: DSRegionObjectElement
    
  2. class DecodedBarcodeElement: RegionObjectElement
    

Methods

Methods Description
init Initialize a new DSDecodedBarcodeElement object.
getText Get the text of the decoded barcode.
setText Set the text of the decoded barcode.
getBytes Get the bytes of the decoded barcode.
setBytes Set the bytes of the decoded barcode.
getFormat Get the format of the decoded barcode.
setFormat Set the format of the decoded barcode.
getConfidence Get the confidence of the decoded barcode.
setConfidence Set the confidence of the decoded barcode.
getFormatString Get the format string of the decoded barcode.
getAngle Get the angle of the decoded barcode.
getModuleSize Get the module size of the decoded barcode.
getDetails Get the details of the decoded barcode.
getExtendedBarcodeResults Get the extended barcode results of the decoded barcode.
isDPM Check if the decoded barcode is DPM.
isMirrored Check if the decoded barcode is mirrored.

Inherited Attributes

The following attributes are inherited from class DSRegionObjectElement.

Method Description
getLocation Returns the location info of the element.
setLocation Sets the location info of the element.
getReferencedElement Returns the referenced element that supports the capturing of this element.
getRegionObjectElementType Returns the type of the element.

init

Create a new DSDecodedBarcodeElement object.

  • Objective-C
  • Swift
  1. - (instancetype)init;
    
  2. init()
    

getText

Get the text of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSString *)getText
    
  2. func getText() -> String
    

Return Value

The text of the decoded barcode.

setText

Set the text of the decoded barcode. The byte of the barcode is changed as well.

  • Objective-C
  • Swift
  1. - (NSInteger)setText:(NSString *)text
    
  2. func setText(text: String) -> NSInteger
    

Parameters

[in] text: The text of the decoded barcode.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

getBytes

Get the bytes of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSData *)getBytes
    
  2. func getBytes() -> NSData
    

Return Value

The bytes of the decoded barcode.

setBytes

Set the bytes of the decoded barcode. The text of the barcode is changed as well.

  • Objective-C
  • Swift
  1. - (NSInteger)setBytes:(NSData *)bytes
    
  2. func setBytes(bytes: NSData) -> NSInteger
    

Parameters

[in] bytes: The bytes of the decoded barcode.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

getFormat

Get the format of the decoded barcode.

  • Objective-C
  • Swift
  1. - (DSBarcodeFormat)getFormat
    
  2. func getFormat() -> BarcodeFormat
    

Return Value

The format of the decoded barcode.

setFormat

Set the format of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSInteger)setFormat:(DSBarcodeFormat)format
    
  2. func setFormat(_ format: BarcodeFormat) -> NSInteger
    

Parameters

[in] format: The format of the decoded barcode.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

getConfidence

Get the confidence of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSInteger)getConfidence
    
  2. func getConfidence() -> NSInteger
    

Return Value

The confidence of the decoded barcode.

setConfidence

Set the confidence of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSInteger)setConfidence:(NSInteger)confidence
    
  2. func setConfidence(_ confidence: NSInteger) -> NSInteger
    

Parameters

[in] confidence: The confidence of the decoded barcode.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

getFormatString

Get the format string of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSString *)getFormatString
    
  2. func getFormatString() -> String
    

Return Value

The format string of the decoded barcode.

getAngle

Get the angle of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSInteger)getAngle
    
  2. func getAngle() -> NSInteger
    

Return Value

The angle of the decoded barcode.

getModuleSize

Get the module size of the decoded barcode.

  • Objective-C
  • Swift
  1. - (NSInteger)getModuleSize
    
  2. func getModuleSize() -> NSInteger
    

Return Value

The module size of the decoded barcode.

getDetails

Get the details of the decoded barcode.

  • Objective-C
  • Swift
  1. - (DSBarcodeDetails *)getDetails
    
  2. func getDetails() -> BarcodeDetails
    

Return Value

The details of the decoded barcode.

getExtendedBarcodeResults

Get the extended barcode results of the decoded barcode.

  • Objective-C
  • Swift
  1. - (nullable NSArray<DSExtendedBarcodeResult *>*)getExtendedBarcodeResults
    
  2. func getExtendedBarcodeResults() -> [ExtendedBarcodeResult]?
    

Return Value

The extended barcode results of the decoded barcode.

isDPM

Check if the decoded barcode is DPM.

  • Objective-C
  • Swift
  1. - (BOOL)isDPM
    
  2. func isDPM() -> Bool
    

Return Value

Returns true if the decoded barcode is DPM. Otherwise, returns false.

isMirrored

Check if the decoded barcode is mirrored.

  • Objective-C
  • Swift
  1. - (BOOL)isMirrored
    
  2. func isMirrored() -> Bool
    

Return Value

Returns true if the decoded barcode is mirrored. Otherwise, returns false.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version (10.2.10)
  • Version 10.x
    • Version 10.0.21
    • Version 10.0.20
  • Version 9.x
    • Version 9.6.20
    • Version 9.6.11
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.13
    • Version 9.2.11
    • Version 9.2.10
    • Version 9.0.2
    • Version 9.0.1
    • Version 9.0.0
  • Version 8.x
    • Version 8.9.3
    • Version 8.9.1
    • Version 8.9.0
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.1
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +