Commit e2453f84 authored by Vitaly Lipatov's avatar Vitaly Lipatov

UniXML: use const for read only funcs

parent 92b095ab
...@@ -127,11 +127,11 @@ class UniXML_iterator ...@@ -127,11 +127,11 @@ class UniXML_iterator
{} {}
UniXML_iterator() {} UniXML_iterator() {}
std::string getProp(const std::string name); std::string getProp(const std::string name) const;
std::string getPropUtf8(const std::string name); std::string getPropUtf8(const std::string name) const;
int getIntProp(const std::string name); int getIntProp(const std::string name) const;
/// if value if not positive ( <= 0 ), returns def /// if value if not positive ( <= 0 ), returns def
int getPIntProp(const std::string name, int def); int getPIntProp(const std::string name, int def) const;
void setProp(const std::string name, const std::string text); void setProp(const std::string name, const std::string text);
/*! . false, */ /*! . false, */
......
...@@ -450,24 +450,24 @@ bool UniXML_iterator::goChildren() ...@@ -450,24 +450,24 @@ bool UniXML_iterator::goChildren()
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
string UniXML_iterator::getProp( const string name ) string UniXML_iterator::getProp( const string name ) const
{ {
return UniXML::getProp(curNode, name); return UniXML::getProp(curNode, name);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
string UniXML_iterator::getPropUtf8( const string name ) string UniXML_iterator::getPropUtf8( const string name ) const
{ {
return UniXML::getPropUtf8(curNode, name); return UniXML::getPropUtf8(curNode, name);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
int UniXML_iterator::getIntProp( const string name ) int UniXML_iterator::getIntProp( const string name ) const
{ {
return UniSetTypes::uni_atoi((char*)::xmlGetProp(curNode, (const xmlChar*)name.c_str())); return UniSetTypes::uni_atoi((char*)::xmlGetProp(curNode, (const xmlChar*)name.c_str()));
} }
int UniXML_iterator::getPIntProp( const string name, int def ) int UniXML_iterator::getPIntProp( const string name, int def ) const
{ {
int i = getIntProp(name); int i = getIntProp(name);
if (i <= 0) if (i <= 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment