9#include <util/misc/ioUtil.h>
26 if (
isEnd())
return false;
28 if (
isEnd())
return false;
36 if (
isEnd())
return false;
43 int beginLabel, endLabel;
46 if (
isEnd())
return false;
48 while (
c() !=
'>' &&
c() !=
' ') {
50 if (
isEnd())
return false;
53 label_ =
string().substr(beginLabel, endLabel - beginLabel);
56 if (
isEnd())
return false;
66 const std::string& line,
int begin)
68 if (!
match(line, begin)) {
69 Log::file() <<
"line = " << line << std::endl;
72 if (
label() != expected) {
73 Log::file() <<
"line = " << line << std::endl;
74 Log::file() <<
"expected = " << expected << std::endl;
static std::ostream & file()
Get log ostream by reference.
void skip()
Skip leading white space, if any.
const std::string & string() const
Return the associated string.
void next()
Advance to the next character.
int cursor() const
Return the index of the current character.
void setString(const std::string &string, int cursor=0)
Initialize string and cursor.
int c() const
Return the current character.
bool isEnd() const
Has the cursor reached the end of the string?
const std::string label()
Label string.
bool match(const std::string &string, int begin)
Attempt to match any end tag.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Utility classes for scientific computation.