Commit 42cfd4b6 authored by Pavel Vainerman's avatar Pavel Vainerman

(UniXML): const

parent 2e291e93
......@@ -58,7 +58,7 @@ namespace uniset
bool findName( const std::string& node, const std::string& searchname, bool deepfind = true ) noexcept;
bool find( const std::string& searchnode, bool deepfind = true) noexcept;
xmlNode* findX( xmlNode* root, const std::string& searchnode, bool deepfind = true ) noexcept;
xmlNode* findX( xmlNode* root, const std::string& searchnode, bool deepfind = true ) const noexcept;
/*! Перейти к следующему узлу. Возвращает false, если некуда перейти */
bool goNext() noexcept;
......@@ -187,7 +187,7 @@ namespace uniset
// Функция поиска по текущему уровню (без рекурсии для дочерних узлов)
// root указывается исходный, внутри функции осуществляется переход к списку дочерних узлов
// (другими словами делать goChildren() не надо)
xmlNode* findNodeLevel1( xmlNode* root, const std::string& nodename, const std::string& nm = "" );
xmlNode* findNodeLevel1( xmlNode* root, const std::string& nodename, const std::string& nm = "" ) const;
protected:
......
......@@ -379,7 +379,7 @@ xmlNode* UniXML::extFindNode( xmlNode* node, int depth, int width, const string&
return NULL;
}
// -----------------------------------------------------------------------------
xmlNode* UniXML::findNodeLevel1( xmlNode* root, const string& nodename, const string& nm )
xmlNode* UniXML::findNodeLevel1( xmlNode* root, const string& nodename, const string& nm ) const
{
UniXML::iterator it(root);
......@@ -628,7 +628,7 @@ bool UniXML_iterator::find( const std::string& searchnode, bool deepfind ) noexc
return false;
}
// -------------------------------------------------------------------------
xmlNode* UniXML_iterator::findX( xmlNode* root, const std::string& searchnode, bool deepfind ) noexcept
xmlNode* UniXML_iterator::findX( xmlNode* root, const std::string& searchnode, bool deepfind ) const noexcept
{
if( root == NULL )
return NULL;
......
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