8#include "XmlAttribute.h"
9#include <util/misc/ioUtil.h>
36 if (
isEnd())
return false;
38 if (
isEnd())
return false;
41 int beginLabel, endLabel;
42 if (
c() ==
'=')
return false;
43 if (
c() ==
'>')
return false;
47 if (
isEnd())
return false;
48 if (
c() ==
'>')
return false;
55 if (
isEnd())
return false;
58 int beginValue, endValue;
60 if (
c() ==
'\'' ||
c() ==
'\"') {
66 if (
isEnd())
return false;
68 while (
c() != quote) {
70 if (
isEnd())
return false;
75 label_ =
string().substr(beginLabel, endLabel - beginLabel);
77 value_.str(
string().substr(beginValue, endValue - beginValue));
XmlAttribute()
Constructor.
virtual ~XmlAttribute()
Destructor.
bool match(const std::string &string, int begin)
Return true if an attribute is found, false otherwise.
Base class for classes that parse XML markup tags.
void skip()
Skip leading white space, if any.
const std::string & string() const
Return the associated string.
void setCursor(int cursor)
Set cursor.
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?
int rStrip(std::string &str)
Strip trailing whitespace from a string.
Utility classes for scientific computation.