frepple::utils::Attribute Class Reference

A class to model keyword instances. More...

#include <utils.h>

List of all members.

Public Member Functions

 Attribute (const Attribute &o)
 Attribute (const char *c)
 Attribute (const string &n)
 Attribute ()
hashtype getHash () const
const char * getName () const
bool isA (const Keyword *t) const
bool isA (const Keyword &t) const
bool operator< (const Attribute &o) const
bool operator== (const string o) const
void reset (const XMLCh *const c)
void reset (const char *const c)

Detailed Description

A class to model keyword instances.

The class uses hashes to do a fast comparison with the set of keywords.

Definition at line 2586 of file utils.h.


Constructor & Destructor Documentation

frepple::utils::Attribute::Attribute (  )  [inline, explicit]

Default constructor.

Definition at line 2600 of file utils.h.

frepple::utils::Attribute::Attribute ( const string &  n  )  [inline, explicit]

Constructor.

Definition at line 2603 of file utils.h.

frepple::utils::Attribute::Attribute ( const char *  c  )  [inline, explicit]

Constructor.

Definition at line 2607 of file utils.h.

frepple::utils::Attribute::Attribute ( const Attribute o  )  [inline]

Copy constructor.

Definition at line 2610 of file utils.h.


Member Function Documentation

hashtype frepple::utils::Attribute::getHash (  )  const [inline]

Returns the hash value of this tag.

Definition at line 2613 of file utils.h.

const char * frepple::utils::Attribute::getName (  )  const

Return the element name. Since this method involves a lookup in a table with Keywords, it has some performance impact and should be avoided where possible. Only the hash of an element can efficiently be retrieved.

Definition at line 668 of file xmlparser.cpp.

bool frepple::utils::Attribute::isA ( const Keyword t  )  const [inline]

Returns true when this element is an instance of this tag. This method doesn't involve a string comparison and is extremely efficient.

Definition at line 2644 of file utils.h.

bool frepple::utils::Attribute::isA ( const Keyword t  )  const [inline]

Returns true when this element is an instance of this tag. This method doesn't involve a string comparison and is extremely efficient.

Definition at line 2640 of file utils.h.

bool frepple::utils::Attribute::operator< ( const Attribute o  )  const [inline]

Comparison operator.

Definition at line 2647 of file utils.h.

bool frepple::utils::Attribute::operator== ( const string  o  )  const [inline]

String comparison.

Definition at line 2650 of file utils.h.

void frepple::utils::Attribute::reset ( const XMLCh *const   c  )  [inline]

Returns this tag.

Definition at line 2623 of file utils.h.

void frepple::utils::Attribute::reset ( const char *const   c  )  [inline]

Returns this tag.

Definition at line 2616 of file utils.h.


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

Generated on 21 Mar 2010 for frePPLe by  doxygen 1.6.1