#ifndef __UTILS__ #define __UTILS__ #include #include #define nothing() do {} while (0) boost::posix_time::ptime ptEpoch(); int iToSeconds(boost::posix_time::ptime ptWhen); boost::posix_time::ptime ptFromSeconds(int iSeconds); template std::string strJoin(Iterator first, Iterator last, std::string strSeperator) { std::ostringstream ossValues; for (Iterator start = first; first != last; first++) { ossValues << str(boost::format("%s%s") % (start == first ? "" : strSeperator) % *first); } return ossValues.str(); } #endif // vim:ts=4