xml_generator: add attribute String<N> method

Make it possible to directly pass on a Genode::String<N> object instead
of using Genode::String<N>.string() by hand.

Fixes #1783.
This commit is contained in:
Josef Söntgen 2015-11-22 12:25:23 +01:00 committed by Christian Helmuth
parent 59d2a83f30
commit e13971fcf0

View File

@ -312,6 +312,12 @@ class Genode::Xml_generator
_curr_node->insert_attribute(name, str);
}
template <size_t N>
void attribute(char const *name, String<N> const &str)
{
_curr_node->insert_attribute(name, str.string());
}
void attribute(char const *name, long value)
{
char buf[64];