Add 'Xml_node::has_sub_node' accessor
This commit is contained in:
parent
373c5bdbf7
commit
2f483500b0
|
@ -705,6 +705,15 @@ namespace Genode {
|
||||||
try { attribute(type); return true; } catch (...) { }
|
try { attribute(type); return true; } catch (...) { }
|
||||||
return false;
|
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;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue