Simpatico
v1.10
|
Parser for an XML end tag.
Definition at line 24 of file XmlEndTag.h.
#include <XmlEndTag.h>
Public Member Functions | |
XmlEndTag () | |
Constructor. More... | |
~XmlEndTag () | |
Destructor. More... | |
bool | match (const std::string &string, int begin) |
Attempt to match any end tag. More... | |
void | match (const std::string expected, const std::string &string, int begin) |
Match a required end tag. More... | |
const std::string | label () |
Label string. 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::XmlEndTag::XmlEndTag | ( | ) |
Constructor.
Definition at line 14 of file XmlEndTag.cpp.
Util::XmlEndTag::~XmlEndTag | ( | ) |
Destructor.
Definition at line 17 of file XmlEndTag.cpp.
bool Util::XmlEndTag::match | ( | const std::string & | string, |
int | begin | ||
) |
Attempt to match any end tag.
Return true if end tag found, false otherwise.
string | containing text of XML tag |
begin | index of first character |
Definition at line 20 of file XmlEndTag.cpp.
References Util::XmlBase::c(), Util::XmlBase::cursor(), Util::XmlBase::isEnd(), Util::XmlBase::next(), Util::XmlBase::setString(), Util::XmlBase::skip(), and Util::XmlBase::string().
Referenced by match(), and Tools::HoomdConfigReader::readConfig().
void Util::XmlEndTag::match | ( | const std::string | expected, |
const std::string & | string, | ||
int | begin | ||
) |
Match a required end tag.
Throw exception is specified end tag does not match.
expected | expected label string |
string | containing text of XML tag |
begin | index of first character |
Definition at line 65 of file XmlEndTag.cpp.
References Util::Log::file(), label(), match(), and UTIL_THROW.
|
inline |
Label string.
Definition at line 64 of file XmlEndTag.h.
Referenced by match(), and Tools::HoomdConfigReader::readConfig().