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

#include <SAXParser.hpp>

List of all members.

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

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

Definition at line 472 of file SAXParser.hpp.

{};

Member Function Documentation

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

Definition at line 473 of file SAXParser.hpp.

References name.

{
return !strcmp(test,name); // return true on match
}
const char* pwiz::minimxml::SAXParser::Handler::Attributes::attribute::getName ( ) const
inline

Definition at line 477 of file SAXParser.hpp.

References name.

Referenced by PrintAttribute::operator()().

{
return name;
}
const char* pwiz::minimxml::SAXParser::Handler::Attributes::attribute::getValuePtr ( XMLUnescapeBehavior_t  Unescape = XMLUnescapeDefault) const
inline
std::string pwiz::minimxml::SAXParser::Handler::Attributes::attribute::getValue ( XMLUnescapeBehavior_t  Unescape = XMLUnescapeDefault) const
inline

Definition at line 493 of file SAXParser.hpp.

References getValuePtr().

Referenced by PrintAttribute::operator()().

{
return std::string(getValuePtr(Unescape));
}
template<typename T >
T pwiz::minimxml::SAXParser::Handler::Attributes::attribute::valueAs ( XMLUnescapeBehavior_t  Unescape) const
inline

Definition at line 499 of file SAXParser.hpp.

References getValuePtr().

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

{
return textToValue<T>(getValuePtr(Unescape));
}
size_t pwiz::minimxml::SAXParser::Handler::Attributes::attribute::valueAs ( XMLUnescapeBehavior_t  Unescape) const
inline

Definition at line 504 of file SAXParser.hpp.

References getValuePtr().

{
return (size_t)strtoul(getValuePtr(Unescape),NULL,10);
}
void pwiz::minimxml::SAXParser::Handler::Attributes::attribute::set ( const char *  _name,
char *  _value,
bool  _needsUnescape 
)
inlineprotected

Definition at line 514 of file SAXParser.hpp.

References name, needsUnescape, and value.

{
name = _name;
value = _value;
needsUnescape = _needsUnescape;
}

Friends And Related Function Documentation

friend class Attributes
friend

Definition at line 509 of file SAXParser.hpp.


Member Data Documentation

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

Definition at line 511 of file SAXParser.hpp.

Referenced by getName(), matchName(), and set().

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

Definition at line 512 of file SAXParser.hpp.

Referenced by getValuePtr(), and set().

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

Definition at line 513 of file SAXParser.hpp.

Referenced by getValuePtr(), and set().


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