Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Tag< P > Class Template Reference

#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
 

Detailed Description

template<class P>
class elm::io::Tag< P >

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.

Member Typedef Documentation

◆ t

typedef cstring t

Constructor & Destructor Documentation

◆ Tag()

Tag ( const typename P::t &  val)
inline

Member Function Documentation

◆ print()

void print ( io::Output out) const
inline

References elm::io::out.

Referenced by elm::io::operator<<().


The documentation for this class was generated from the following file: