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

decoded barcode symbol result object. More...

Collaboration diagram for zbar::Symbol:

Classes

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

Protected Member Functions

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

Private Attributes

std::string _data
 
const zbar_symbol_t_sym
 
zbar_symbol_type_t _type
 
char * _xmlbuf
 
unsigned _xmllen
 

Friends

class SymbolIterator
 

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

Constructor & Destructor Documentation

zbar::Symbol::Symbol ( const zbar_symbol_t sym = NULL)
inline

constructor.

References zbar::SymbolSet::ref().

Here is the call graph for this function:

zbar::Symbol::Symbol ( const Symbol sym)
inline

copy constructor.

References zbar::SymbolSet::ref().

Here is the call graph for this function:

zbar::Symbol::~Symbol ( )
inline

destructor.

References zbar::SymbolSet::ref().

Here is the call graph for this function:

Member Function Documentation

const std::string zbar::Symbol::get_addon_name ( ) const
inline

retrieve the string name for any addon.

References zbar::zbar_get_addon_name().

Referenced by operator<<().

Here is the call graph for this function:

Here is the caller graph for this function:

SymbolSet zbar::Symbol::get_components ( ) const
inline

References zbar::SymbolSet::SymbolSet(), and zbar::zbar_symbol_get_components().

Here is the call graph for this function:

int zbar::Symbol::get_count ( ) const
inline

retrieve inter-frame coherency count.

see zbar_symbol_get_count()

Since
1.5

References zbar::zbar_symbol_get_count().

Here is the call graph for this function:

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

retrieve data decoded from symbol.

Referenced by operator<<().

Here is the caller graph for this function:

unsigned zbar::Symbol::get_data_length ( ) const
inline

retrieve length of binary data

References zbar::zbar_symbol_get_data_length().

Here is the call graph for this function:

int zbar::Symbol::get_location_size ( ) const
inline

see zbar_symbol_get_loc_size().

References zbar::zbar_symbol_get_loc_size().

Here is the call graph for this function:

int zbar::Symbol::get_location_x ( unsigned  index) const
inline

see zbar_symbol_get_loc_x().

References zbar::zbar_symbol_get_loc_x().

Here is the call graph for this function:

int zbar::Symbol::get_location_y ( unsigned  index) const
inline

see zbar_symbol_get_loc_y().

References zbar::zbar_symbol_get_loc_y().

Here is the call graph for this function:

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

retrieve type of decoded symbol.

const std::string zbar::Symbol::get_type_name ( ) const
inline

retrieve the string name of the symbol type.

References zbar::zbar_get_symbol_name().

Referenced by operator<<().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::Symbol::init ( const zbar_symbol_t sym = NULL)
inlineprotected

(re)initialize Symbol from C symbol object.

References zbar::ZBAR_NONE, zbar::zbar_symbol_get_data(), zbar::zbar_symbol_get_data_length(), and zbar::zbar_symbol_get_type().

Here is the call graph for this function:

zbar::Symbol::operator const zbar_symbol_t * ( ) const
inline

cast to C symbol.

bool zbar::Symbol::operator!= ( const Symbol sym) const
inline

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

bool zbar::Symbol::operator== ( const Symbol sym) const
inline

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

References _sym.

PointIterator zbar::Symbol::point_begin ( ) const
inline

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

const PointIterator zbar::Symbol::point_end ( ) const
inline

return a PointIterator suitable for ending iteration.

void zbar::Symbol::ref ( int  delta = 1) const
inline

References zbar::zbar_symbol_ref().

Here is the call graph for this function:

const std::string zbar::Symbol::xml ( ) const
inline

see zbar_symbol_xml().

References zbar::zbar_symbol_xml().

Here is the call graph for this function:

Friends And Related Function Documentation

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

stream the string representation of a Symbol.

References get_addon_name(), get_data(), and get_type_name().

Here is the call graph for this function:

friend class SymbolIterator
friend

Member Data Documentation

std::string zbar::Symbol::_data
private
const zbar_symbol_t* zbar::Symbol::_sym
private

Referenced by operator==().

zbar_symbol_type_t zbar::Symbol::_type
private
char* zbar::Symbol::_xmlbuf
private
unsigned zbar::Symbol::_xmllen
private

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