mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
committed by
Christian Helmuth
parent
d891016632
commit
4aafa882d8
@ -21,6 +21,7 @@ namespace Genode {
|
|||||||
|
|
||||||
class Xml_attribute;
|
class Xml_attribute;
|
||||||
class Xml_node;
|
class Xml_node;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -104,6 +105,10 @@ class Genode::Xml_attribute
|
|||||||
strncpy(dst, _name.start(), max_len);
|
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
|
* 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 {
|
void type_name(char *dst, size_t max_len) const {
|
||||||
_start_tag.name().string(dst, max_len); }
|
_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
|
* Return true if tag is of specified type
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user