util Namespace Reference

General utilities. More...


Functions

template<typename T >
std::string toString (const T &t)
 Converts an object into a new its string representation.


Detailed Description

General utilities.


Function Documentation

template<typename T >
std::string util::toString ( const T &  t  )  [inline]

Converts an object into a new its string representation.

Uses the standard class stringstream. The objects type T must provide an implementation of the canonical << method:

std::ostream & operator <<(std::ostream& os, const T& t)

where T is a real type.

00060                                                             {
00061    std::stringstream ss;
00062    ss << t;
00063    return ss.str();
00064 }

Here is the caller graph for this function:


Generated on Tue Jun 16 23:13:04 2009 by  doxygen 1.5.9