00001 #ifndef MYSQLPP_STREAM2STRING_H 00002 #define MYSQLPP_STREAM2STRING_H 00003 00007 00008 #include <sstream> 00009 00010 namespace mysqlpp { 00011 00018 00019 template<class Strng, class T> 00020 Strng stream2string(const T &object) 00021 { 00022 std::ostringstream str; 00023 object.out_stream(str); 00024 str << std::ends; 00025 Strng s = str.str(); 00026 return s; 00027 } 00028 00029 } // end namespace mysqlpp 00030 00031 #endif 00032