PSCF v1.3
|
Parser for an XML attribute. More...
#include <XmlAttribute.h>
Public Member Functions | |
XmlAttribute () | |
Constructor. | |
virtual | ~XmlAttribute () |
Destructor. | |
bool | match (const std::string &string, int begin) |
Return true if an attribute is found, false otherwise. | |
bool | match (XmlBase &parser) |
If successful return true and advance cursor or parent parser. | |
const std::string & | label () |
Return label string. | |
std::stringstream & | value () |
Return value string, without quotes. | |
Public Member Functions inherited from Util::XmlBase | |
XmlBase () | |
Constructor. | |
~XmlBase () | |
Destructor. | |
void | setString (const std::string &string, int cursor=0) |
Initialize string and cursor. | |
void | setCursor (int cursor) |
Set cursor. | |
void | skip () |
Skip leading white space, if any. | |
void | next () |
Advance to the next character. | |
const std::string & | string () const |
Return the associated string. | |
int | cursor () const |
Return the index of the current character. | |
int | c () const |
Return the current character. | |
bool | isEnd () const |
Has the cursor reached the end of the string? |
Parser for an XML attribute.
Definition at line 23 of file XmlAttribute.h.
Util::XmlAttribute::XmlAttribute | ( | ) |
|
virtual |
Destructor.
Definition at line 23 of file XmlAttribute.cpp.
bool Util::XmlAttribute::match | ( | const std::string & | string, |
int | begin ) |
Return true if an attribute is found, false otherwise.
Definition at line 26 of file XmlAttribute.cpp.
References Util::XmlBase::c(), Util::XmlBase::cursor(), Util::XmlBase::isEnd(), Util::XmlBase::next(), Util::rStrip(), Util::XmlBase::setString(), Util::XmlBase::skip(), and Util::XmlBase::string().
Referenced by match(), and Util::XmlStartTag::matchAttribute().
bool Util::XmlAttribute::match | ( | XmlBase & | parser | ) |
If successful return true and advance cursor or parent parser.
parser | parent parser object |
Definition at line 82 of file XmlAttribute.cpp.
References Util::XmlBase::cursor(), match(), Util::XmlBase::setCursor(), Util::XmlBase::string(), and Util::XmlBase::XmlBase().
|
inline |
Return label string.
Definition at line 53 of file XmlAttribute.h.
Referenced by Util::XmlXmlTag::match().
|
inline |
Return value string, without quotes.
Definition at line 59 of file XmlAttribute.h.