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  }

References name, and test().

◆ getName()

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

Definition at line 477 of file SAXParser.hpp.

478  {
479  return name;
480  }

References name.

Referenced by PrintAttribute::operator()().

◆ 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.

493  {
494  return std::string(getValuePtr(Unescape));
495  }

References getValuePtr().

Referenced by PrintAttribute::operator()().

◆ 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.

500  {
501  return textToValue<T>(getValuePtr(Unescape));
502  }

References getValuePtr().

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

◆ 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  }

References getValuePtr().

◆ set()

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

Definition at line 514 of file SAXParser.hpp.

515  {
516  name = _name;
517  value = _value;
518  needsUnescape = _needsUnescape;
519  }

References name, needsUnescape, and value.

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.

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

◆ value

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

Definition at line 512 of file SAXParser.hpp.

Referenced by getValuePtr(), and set().

◆ needsUnescape

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:
pwiz::minimxml::SAXParser::Handler::Attributes::attribute::value
char * value
Definition: SAXParser.hpp:512
pwiz::minimxml::SAXParser::Handler::Attributes::attribute::getValuePtr
const char * getValuePtr(XMLUnescapeBehavior_t Unescape=XMLUnescapeDefault) const
Definition: SAXParser.hpp:483
pwiz::minimxml::SAXParser::Handler::NoXMLUnescape
@ NoXMLUnescape
Definition: SAXParser.hpp:350
test
void test()
Definition: ChromatogramList_FilterTest.cpp:200
pwiz::minimxml::SAXParser::unescapeXML
PWIZ_API_DECL void unescapeXML(char *str)
pwiz::minimxml::SAXParser::Handler::Attributes::attribute::name
const char * name
Definition: SAXParser.hpp:511
pwiz::minimxml::SAXParser::Handler::Attributes::attribute::needsUnescape
bool needsUnescape
Definition: SAXParser.hpp:513