ProteoWizard
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
pwiz::minimxml::SAXParser::Handler::Attributes::attribute Class Reference

#include <SAXParser.hpp>

Public Member Functions

 attribute ()
 
bool matchName (const char *test) const
 
const char * getName () const
 
const char * getValuePtr (XMLUnescapeBehavior_t Unescape=XMLUnescapeDefault) const
 
std::string getValue (XMLUnescapeBehavior_t Unescape=XMLUnescapeDefault) const
 
template<typename T >
valueAs (XMLUnescapeBehavior_t Unescape) const
 
size_t valueAs (XMLUnescapeBehavior_t Unescape) const
 

Protected Member Functions

void set (const char *_name, char *_value, bool _needsUnescape)
 

Protected Attributes

const char * name
 
char * value
 
bool needsUnescape
 

Friends

class Attributes
 

Detailed Description

Definition at line 468 of file SAXParser.hpp.

Constructor & Destructor Documentation

§ attribute()

pwiz::minimxml::SAXParser::Handler::Attributes::attribute::attribute ( )
inline

Definition at line 472 of file SAXParser.hpp.

472 {};

Member Function Documentation

§ matchName()

bool pwiz::minimxml::SAXParser::Handler::Attributes::attribute::matchName ( const char *  test) const
inline

Definition at line 473 of file SAXParser.hpp.

474  {
475  return !strcmp(test,name); // return true on match
476  }
void test()

§ getName()

const char* pwiz::minimxml::SAXParser::Handler::Attributes::attribute::getName ( ) const
inline

Definition at line 477 of file SAXParser.hpp.

Referenced by PrintAttribute::operator()().

478  {
479  return name;
480  }

§ getValuePtr()

const char* pwiz::minimxml::SAXParser::Handler::Attributes::attribute::getValuePtr ( XMLUnescapeBehavior_t  Unescape = XMLUnescapeDefault) const
inline

§ getValue()

std::string pwiz::minimxml::SAXParser::Handler::Attributes::attribute::getValue ( XMLUnescapeBehavior_t  Unescape = XMLUnescapeDefault) const
inline

Definition at line 493 of file SAXParser.hpp.

Referenced by PrintAttribute::operator()().

493  {
494  return std::string(getValuePtr(Unescape));
495  }
const char * getValuePtr(XMLUnescapeBehavior_t Unescape=XMLUnescapeDefault) const
Definition: SAXParser.hpp:483

§ valueAs() [1/2]

template<typename T >
T pwiz::minimxml::SAXParser::Handler::Attributes::attribute::valueAs ( XMLUnescapeBehavior_t  Unescape) const
inline

Definition at line 499 of file SAXParser.hpp.

Referenced by pwiz::minimxml::SAXParser::Handler::getAttribute().

500  {
501  return textToValue<T>(getValuePtr(Unescape));
502  }
const char * getValuePtr(XMLUnescapeBehavior_t Unescape=XMLUnescapeDefault) const
Definition: SAXParser.hpp:483

§ valueAs() [2/2]

size_t pwiz::minimxml::SAXParser::Handler::Attributes::attribute::valueAs ( XMLUnescapeBehavior_t  Unescape) const
inline

Definition at line 504 of file SAXParser.hpp.

505  {
506  return (size_t)strtoul(getValuePtr(Unescape),NULL,10);
507  }
const char * getValuePtr(XMLUnescapeBehavior_t Unescape=XMLUnescapeDefault) const
Definition: SAXParser.hpp:483

§ set()

void pwiz::minimxml::SAXParser::Handler::Attributes::attribute::set ( const char *  _name,
char *  _value,
bool  _needsUnescape 
)
inlineprotected

Friends And Related Function Documentation

§ Attributes

friend class Attributes
friend

Definition at line 509 of file SAXParser.hpp.

Member Data Documentation

§ name

const char* pwiz::minimxml::SAXParser::Handler::Attributes::attribute::name
protected

Definition at line 511 of file SAXParser.hpp.

§ value

char* pwiz::minimxml::SAXParser::Handler::Attributes::attribute::value
protected

Definition at line 512 of file SAXParser.hpp.

§ needsUnescape

bool pwiz::minimxml::SAXParser::Handler::Attributes::attribute::needsUnescape
mutableprotected

Definition at line 513 of file SAXParser.hpp.


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