Zoltan Hudak / zbar

Dependents:   BarcodeReader_F103

Embed: (wiki syntax)

« Back to documentation index

Decoder Class Reference

Decoder Class Reference

low-level bar width stream decoder interface. More...

#include <Decoder.h>

Data Structures

class  Handler
 Decoder result handler. More...

Public Member Functions

 Decoder ()
 constructor.
void reset ()
 clear all decoder state.
void new_scan ()
 mark start of a new scan pass.
zbar_symbol_type_t decode_width (unsigned width)
 process next bar/space width from input stream.
Decoderoperator<< (unsigned width)
 process next bar/space width from input stream.
zbar_color_t get_color () const
 retrieve color of next element passed to Decoder.
zbar_symbol_type_t get_type () const
 retrieve last decoded symbol type.
const char * get_symbol_name () const
 retrieve string name of last decoded symbol type.
const char * get_addon_name () const
 retrieve string name for last decode addon.
const char * get_data_chars () const
 retrieve last decoded data in ASCII format as a char array.
const std::string get_data_string () const
 retrieve last decoded data as a std::string.
const std::string get_data () const
 retrieve last decoded data as a std::string.
int get_data_length () const
 retrieve length of decoded binary data.
void set_handler (Handler &handler)
 setup callback to handle result data.
int set_config (zbar_symbol_type_t symbology, zbar_config_t config, int value)
 set config for indicated symbology (0 for all) to specified value.
int set_config (std::string cfgstr)
 set config parsed from configuration string.

Detailed Description

low-level bar width stream decoder interface.

identifies symbols and extracts encoded data

Definition at line 40 of file Decoder.h.


Constructor & Destructor Documentation

Decoder (  )

constructor.

Definition at line 55 of file Decoder.h.


Member Function Documentation

zbar_symbol_type_t decode_width ( unsigned  width )

process next bar/space width from input stream.

see zbar_decode_width()

Definition at line 82 of file Decoder.h.

const char* get_addon_name (  ) const

retrieve string name for last decode addon.

see zbar_get_addon_name()

Definition at line 118 of file Decoder.h.

zbar_color_t get_color (  ) const

retrieve color of next element passed to Decoder.

see zbar_decoder_get_color()

Definition at line 97 of file Decoder.h.

const std::string get_data (  ) const

retrieve last decoded data as a std::string.

see zbar_decoder_get_data()

Definition at line 140 of file Decoder.h.

const char* get_data_chars (  ) const

retrieve last decoded data in ASCII format as a char array.

see zbar_decoder_get_data()

Definition at line 125 of file Decoder.h.

int get_data_length (  ) const

retrieve length of decoded binary data.

see zbar_decoder_get_data_length()

Definition at line 147 of file Decoder.h.

const std::string get_data_string (  ) const

retrieve last decoded data as a std::string.

see zbar_decoder_get_data()

Definition at line 132 of file Decoder.h.

const char* get_symbol_name (  ) const

retrieve string name of last decoded symbol type.

see zbar_get_symbol_name()

Definition at line 111 of file Decoder.h.

zbar_symbol_type_t get_type (  ) const

retrieve last decoded symbol type.

see zbar_decoder_get_type()

Definition at line 104 of file Decoder.h.

void new_scan (  )

mark start of a new scan pass.

see zbar_decoder_new_scan()

Definition at line 75 of file Decoder.h.

Decoder& operator<< ( unsigned  width )

process next bar/space width from input stream.

see zbar_decode_width()

Definition at line 89 of file Decoder.h.

void reset (  )

clear all decoder state.

see zbar_decoder_reset()

Definition at line 68 of file Decoder.h.

int set_config ( std::string  cfgstr )

set config parsed from configuration string.

See also:
zbar_decoder_parse_config()
Since:
0.4

Definition at line 173 of file Decoder.h.

int set_config ( zbar_symbol_type_t  symbology,
zbar_config_t  config,
int  value 
)

set config for indicated symbology (0 for all) to specified value.

See also:
zbar_decoder_set_config()
Since:
0.4

Definition at line 163 of file Decoder.h.

void set_handler ( Handler handler )

setup callback to handle result data.

Definition at line 153 of file Decoder.h.