Add 'Xml_node::has_sub_node' accessor

This commit is contained in:
Norman Feske 2013-11-19 14:18:08 +01:00
parent 373c5bdbf7
commit 2f483500b0
1 changed files with 9 additions and 0 deletions

View File

@ -705,6 +705,15 @@ namespace Genode {
try { attribute(type); return true; } catch (...) { }
return false;
}
/**
* Return true if sub node of specified type exists
*/
inline bool has_sub_node(char const *type) const
{
try { sub_node(type); return true; } catch (...) { }
return false;
}
};
}