![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/Output.h>
Public Types | |
typedef cstring | t |
Public Member Functions | |
Tag (const typename P::t &val) | |
void | print (io::Output &out) const |
This convenient class allow controlling the way an object is displayed, usually when the display must not conform to the default display method.
Its template parameter P must be a class defining a type t, the type of the object to display and static function, print, that will be called to display the object of type t.
What does Tag class is just to record an instance of t and call P::print method on it at display time. This let the user to specialize the way the oibject is displayed at this point of the program.
|
inline |
|
inline |
References elm::io::out.
Referenced by elm::io::operator<<().