lestes::msg::formatter< T > Class Template Reference

Object formatter. More...

#include <formatter.hh>

Inheritance diagram for lestes::msg::formatter< T >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual lstring format (const T &x)
 Formats object of type T.

Static Public Member Functions

static ptr< formatter< T > > instance (void)
 Returns the instance.

Protected Member Functions

 formatter (void)
 Creates the object.

Private Member Functions

 formatter (const formatter< T > &)
 Hides copy constructor.
formatter< T > & operator= (const formatter< T > &)
 Hides assignment operator.

Static Private Attributes

static srp< formatter< T > > singleton
 The singleton instance.

Detailed Description

template<typename T>
class lestes::msg::formatter< T >

Object formatter.

Represents formatter template performing conversion of objects to lstring representation. The default formatting is done through ostream and is thus suitable for basic types.

Parameters:
T The type of object to format.


Constructor & Destructor Documentation

template<typename T>
lestes::msg::formatter< T >::formatter ( void   )  [inline, protected]

Creates the object.

Creates the formatter.

template<typename T>
lestes::msg::formatter< T >::formatter ( const formatter< T > &   )  [private]

Hides copy constructor.


Member Function Documentation

template<typename T>
lstring lestes::msg::formatter< T >::format ( const T &  x  )  [inline, virtual]

Formats object of type T.

Converts argument into readable form.

Parameters:
x The object to format.
Returns:
The text representation of the argument.

template<typename T>
ptr< formatter< T > > lestes::msg::formatter< T >::instance ( void   )  [inline, static]

Returns the instance.

Returns the instance of the formatter.

Returns:
The singleton instance.

template<typename T>
formatter<T>& lestes::msg::formatter< T >::operator= ( const formatter< T > &   )  [private]

Hides assignment operator.


Member Data Documentation

template<typename T>
srp< formatter< T > > lestes::msg::formatter< T >::singleton [inline, static, private]

The singleton instance.

The singleton instance of the formatter.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:49:37 2007 for lestes by doxygen 1.5.1-20070107