Simpatico
v1.10
|
Parser for an XML attribute.
Definition at line 23 of file XmlAttribute.h.
#include <XmlAttribute.h>
Public Member Functions | |
XmlAttribute () | |
Constructor. More... | |
virtual | ~XmlAttribute () |
Destructor. More... | |
bool | match (const std::string &string, int begin) |
Return true if an attribute is found, false otherwise. More... | |
bool | match (XmlBase &parser) |
If successful return true and advance cursor or parent parser. More... | |
const std::string & | label () |
Return label string. More... | |
std::stringstream & | value () |
Return value string, without quotes. More... | |
![]() | |
XmlBase () | |
Constructor. More... | |
~XmlBase () | |
Destructor. More... | |
void | setString (const std::string &string, int cursor=0) |
Initialize string and cursor. More... | |
void | setCursor (int cursor) |
Set cursor. More... | |
void | skip () |
Skip leading white space, if any. More... | |
void | next () |
Advance to the next character. More... | |
const std::string & | string () const |
Return the associated string. More... | |
int | cursor () const |
Return the index of the current character. More... | |
int | c () const |
Return the current character. More... | |
bool | isEnd () const |
Has the cursor reached the end of the string? More... | |
Util::XmlAttribute::XmlAttribute | ( | ) |
Constructor.
Definition at line 14 of file XmlAttribute.cpp.
|
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(), Util::XmlXmlTag::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(), and Util::XmlBase::string().
|
inline |
Return label string.
Definition at line 53 of file XmlAttribute.h.
Referenced by Util::XmlXmlTag::match(), and Tools::HoomdConfigReader::readConfig().
|
inline |
Return value string, without quotes.
Definition at line 59 of file XmlAttribute.h.
Referenced by Tools::HoomdConfigReader::readConfig().