base: helper for printing individual characters

This commit is contained in:
Norman Feske 2016-08-15 12:20:52 +02:00 committed by Christian Helmuth
parent 9b3ae0ed2d
commit 9c2f229246

View File

@ -167,6 +167,21 @@ namespace Genode {
*/
void print(Output &output, Hex const &);
/**
* Helper for the output of an individual character
*
* When printing a 'char' value, it appears as an integral number. By
* wrapping the value in a 'Char' object, it appears as character instead.
*/
struct Char
{
char const c;
explicit Char(char c) : c(c) { }
void print(Output &output) const { output.out_char(c); }
};
/**
* Print information about object 'obj'
*