#include <formatter.hh>
Inheritance diagram for lestes::msg::formatter< T >:

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. | |
Represents formatter template performing conversion of objects to lstring representation. The default formatting is done through ostream and is thus suitable for basic types.
| T | The type of object to format. |
Definition at line 52 of file formatter.hh.
| lestes::msg::formatter< T >::formatter | ( | void | ) | [inline, protected] |
Creates the object.
Creates the formatter.
Definition at line 50 of file as_id_formatter.cc.
00050 : object() 00051 {}
| lestes::msg::formatter< T >::formatter | ( | const formatter< T > & | ) | [private] |
Hides copy constructor.
| lstring lestes::msg::formatter< T >::format | ( | const T & | x | ) | [inline, virtual] |
Formats object of type T.
Converts argument into readable form.
| x | The object to format. |
Definition at line 103 of file formatter.hh.
00104 { 00105 ::std::stringbuf sb; 00106 ::std::ostream os(&sb); 00107 os << x; 00108 return sb.str(); 00109 }
| ptr< formatter< T > > lestes::msg::formatter< T >::instance | ( | void | ) | [inline, static] |
Returns the instance.
Returns the instance of the formatter.
Definition at line 38 of file as_id_formatter.cc.
00039 { 00040 if (!the_instance) 00041 the_instance = new formatter< ptr<as_id> >(); 00042 return the_instance; 00043 }
| formatter<T>& lestes::msg::formatter< T >::operator= | ( | const formatter< T > & | ) | [private] |
Hides assignment operator.
srp< formatter< T > > lestes::msg::formatter< T >::singleton [inline, static, private] |
The singleton instance.
The singleton instance of the formatter.
Definition at line 63 of file formatter.hh.
1.5.1-20070107