mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-11 21:32:57 +00:00
parent
d891016632
commit
4aafa882d8
@ -21,6 +21,7 @@ namespace Genode {
|
||||
|
||||
class Xml_attribute;
|
||||
class Xml_node;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -104,6 +105,10 @@ class Genode::Xml_attribute
|
||||
strncpy(dst, _name.start(), max_len);
|
||||
}
|
||||
|
||||
typedef String<64> Name;
|
||||
Name name() const {
|
||||
return Name(_name.start(), _name.len()); }
|
||||
|
||||
/**
|
||||
* Return true if attribute has specified type
|
||||
*/
|
||||
@ -607,6 +612,13 @@ class Genode::Xml_node
|
||||
void type_name(char *dst, size_t max_len) const {
|
||||
_start_tag.name().string(dst, max_len); }
|
||||
|
||||
typedef String<64> Type;
|
||||
Type type() const
|
||||
{
|
||||
Token name = _start_tag.name();
|
||||
return Type(name.start(), name.len());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if tag is of specified type
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user