ZBar Bar Code Reader Library  version 0.10
zbar::Decoder Class Reference

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

Collaboration diagram for zbar::Decoder:

Classes

class  Handler
 Decoder result handler. More...
 

Public Member Functions

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

Static Private Member Functions

static void _cb (zbar_decoder_t *cdcode)
 

Private Attributes

zbar_decoder_t_decoder
 
Handler_handler
 

Friends

class Scanner
 

Detailed Description

low-level bar width stream decoder interface.

identifies symbols and extracts encoded data

Constructor & Destructor Documentation

zbar::Decoder::Decoder ( )
inline

constructor.

References _decoder, and zbar::zbar_decoder_create().

Here is the call graph for this function:

zbar::Decoder::~Decoder ( )
inline

References _decoder, and zbar::zbar_decoder_destroy().

Here is the call graph for this function:

Member Function Documentation

static void zbar::Decoder::_cb ( zbar_decoder_t cdcode)
inlinestaticprivate

References _handler, zbar::Decoder::Handler::decode_callback(), and zbar::zbar_decoder_get_userdata().

Referenced by set_handler().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_symbol_type_t zbar::Decoder::decode_width ( unsigned  width)
inline

process next bar/space width from input stream.

see zbar_decode_width()

References _decoder, and zbar::zbar_decode_width().

Referenced by scan_image().

Here is the call graph for this function:

Here is the caller graph for this function:

const char* zbar::Decoder::get_addon_name ( ) const
inline

retrieve string name for last decode addon.

see zbar_get_addon_name()

References _decoder, zbar::zbar_decoder_get_type(), and zbar::zbar_get_addon_name().

Here is the call graph for this function:

zbar_color_t zbar::Decoder::get_color ( ) const
inline

retrieve color of next element passed to Decoder.

see zbar_decoder_get_color()

References _decoder, and zbar::zbar_decoder_get_color().

Here is the call graph for this function:

const std::string zbar::Decoder::get_data ( ) const
inline

retrieve last decoded data as a std::string.

see zbar_decoder_get_data()

References get_data_string().

Here is the call graph for this function:

const char* zbar::Decoder::get_data_chars ( ) const
inline

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

see zbar_decoder_get_data()

References _decoder, and zbar::zbar_decoder_get_data().

Here is the call graph for this function:

int zbar::Decoder::get_data_length ( ) const
inline

retrieve length of decoded binary data.

see zbar_decoder_get_data_length()

References _decoder, and zbar::zbar_decoder_get_data_length().

Here is the call graph for this function:

const std::string zbar::Decoder::get_data_string ( ) const
inline

retrieve last decoded data as a std::string.

see zbar_decoder_get_data()

References _decoder, zbar::zbar_decoder_get_data(), and zbar::zbar_decoder_get_data_length().

Referenced by get_data(), and scan_image().

Here is the call graph for this function:

Here is the caller graph for this function:

const char* zbar::Decoder::get_symbol_name ( ) const
inline

retrieve string name of last decoded symbol type.

see zbar_get_symbol_name()

References _decoder, zbar::zbar_decoder_get_type(), and zbar::zbar_get_symbol_name().

Here is the call graph for this function:

zbar_symbol_type_t zbar::Decoder::get_type ( ) const
inline

retrieve last decoded symbol type.

see zbar_decoder_get_type()

References _decoder, and zbar::zbar_decoder_get_type().

Here is the call graph for this function:

void zbar::Decoder::new_scan ( )
inline

mark start of a new scan pass.

see zbar_decoder_new_scan()

References _decoder, and zbar::zbar_decoder_new_scan().

Here is the call graph for this function:

Decoder& zbar::Decoder::operator<< ( unsigned  width)
inline

process next bar/space width from input stream.

see zbar_decode_width()

References _decoder, and zbar::zbar_decode_width().

Here is the call graph for this function:

void zbar::Decoder::reset ( )
inline

clear all decoder state.

see zbar_decoder_reset()

References _decoder, and zbar::zbar_decoder_reset().

Referenced by scan_image().

Here is the call graph for this function:

Here is the caller graph for this function:

int zbar::Decoder::set_config ( zbar_symbol_type_t  symbology,
zbar_config_t  config,
int  value 
)
inline

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

See also
zbar_decoder_set_config()
Since
0.4

References _decoder, and zbar::zbar_decoder_set_config().

Here is the call graph for this function:

int zbar::Decoder::set_config ( std::string  cfgstr)
inline

set config parsed from configuration string.

See also
zbar_decoder_parse_config()
Since
0.4

References _decoder, and zbar::zbar_decoder_parse_config().

Here is the call graph for this function:

void zbar::Decoder::set_handler ( Handler handler)
inline

setup callback to handle result data.

References _cb(), _decoder, _handler, zbar::zbar_decoder_set_handler(), and zbar::zbar_decoder_set_userdata().

Here is the call graph for this function:

Friends And Related Function Documentation

friend class Scanner
friend

Member Data Documentation

Handler* zbar::Decoder::_handler
private

Referenced by _cb(), and set_handler().


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