Zoltan Hudak / zbar

Dependents:   BarcodeReader_F103

Embed: (wiki syntax)

« Back to documentation index

Symbol Class Reference

decoded barcode symbol result object. More...

#include <Symbol.h>

Data Structures

class  Point
 image pixel location (x, y) coordinate tuple. More...
class  PointIterator
 iteration over Point objects in a symbol location polygon. More...

Public Member Functions

 Symbol (const zbar_symbol_t *sym=NULL)
 constructor.
 Symbol (const Symbol &sym)
 copy constructor.
 ~Symbol ()
 destructor.
 operator const zbar_symbol_t * () const
 cast to C symbol.
bool operator== (const Symbol &sym) const
 test if two Symbol objects refer to the same C symbol.
bool operator!= (const Symbol &sym) const
 test if two Symbol objects refer to the same C symbol.
zbar_symbol_type_t get_type () const
 retrieve type of decoded symbol.
const std::string get_type_name () const
 retrieve the string name of the symbol type.
const std::string get_addon_name () const
 retrieve the string name for any addon.
const std::string get_data () const
 retrieve data decoded from symbol.
unsigned get_data_length () const
 retrieve length of binary data
int get_count () const
 retrieve inter-frame coherency count.
PointIterator point_begin () const
 create a new PointIterator at the start of the location polygon.
const PointIterator point_end () const
 return a PointIterator suitable for ending iteration.
int get_location_size () const
 see zbar_symbol_get_loc_size().
int get_location_x (unsigned index) const
 see zbar_symbol_get_loc_x().
int get_location_y (unsigned index) const
 see zbar_symbol_get_loc_y().
const std::string xml () const
 see zbar_symbol_xml().

Protected Member Functions

void init (const zbar_symbol_t *sym=NULL)
 (re)initialize Symbol from C symbol object.

Related Functions

(Note that these are not member functions.)


static std::ostream & operator<< (std::ostream &out, const Symbol &sym)

Detailed Description

decoded barcode symbol result object.

stores type, data, and image location of decoded symbol

Definition at line 98 of file Symbol.h.


Constructor & Destructor Documentation

Symbol ( const zbar_symbol_t sym = NULL )

constructor.

Definition at line 190 of file Symbol.h.

Symbol ( const Symbol sym )

copy constructor.

Definition at line 199 of file Symbol.h.

~Symbol (  )

destructor.

Definition at line 210 of file Symbol.h.


Member Function Documentation

const std::string get_addon_name (  ) const

retrieve the string name for any addon.

Definition at line 253 of file Symbol.h.

int get_count (  ) const

retrieve inter-frame coherency count.

see zbar_symbol_get_count()

Since:
1.5

Definition at line 273 of file Symbol.h.

const std::string get_data (  ) const

retrieve data decoded from symbol.

Definition at line 259 of file Symbol.h.

unsigned get_data_length (  ) const

retrieve length of binary data

Definition at line 265 of file Symbol.h.

int get_location_size (  ) const

see zbar_symbol_get_loc_size().

Definition at line 297 of file Symbol.h.

int get_location_x ( unsigned  index ) const

see zbar_symbol_get_loc_x().

Definition at line 303 of file Symbol.h.

int get_location_y ( unsigned  index ) const

see zbar_symbol_get_loc_y().

Definition at line 309 of file Symbol.h.

zbar_symbol_type_t get_type (  ) const

retrieve type of decoded symbol.

Definition at line 241 of file Symbol.h.

const std::string get_type_name (  ) const

retrieve the string name of the symbol type.

Definition at line 247 of file Symbol.h.

void init ( const zbar_symbol_t sym = NULL ) [protected]

(re)initialize Symbol from C symbol object.

Definition at line 327 of file Symbol.h.

operator const zbar_symbol_t * (  ) const

cast to C symbol.

Definition at line 223 of file Symbol.h.

bool operator!= ( const Symbol sym ) const

test if two Symbol objects refer to the same C symbol.

Definition at line 235 of file Symbol.h.

bool operator== ( const Symbol sym ) const

test if two Symbol objects refer to the same C symbol.

Definition at line 229 of file Symbol.h.

PointIterator point_begin (  ) const

create a new PointIterator at the start of the location polygon.

Definition at line 285 of file Symbol.h.

const PointIterator point_end (  ) const

return a PointIterator suitable for ending iteration.

Definition at line 291 of file Symbol.h.

const std::string xml (  ) const

see zbar_symbol_xml().

Definition at line 315 of file Symbol.h.


Friends And Related Function Documentation

static std::ostream & operator<< ( std::ostream &  out,
const Symbol sym 
) [related]

stream the string representation of a Symbol.

Definition at line 440 of file Symbol.h.