nidas v1.2.3
|
class for changing output format of UTime on ostream, in a way like the standard stream manipulator classes. More...
#include <UTime.h>
Public Member Functions | |
UTime_stream_manip (std::basic_ostream< charT, std::char_traits< charT > > &(*f)(std::basic_ostream< charT, std::char_traits< charT > > &, const std::string &), const std::string &fmt) | |
Constructor of manipulator. | |
Private Attributes | |
std::string | _fmt |
std::basic_ostream< charT, std::char_traits< charT > > &(* | _f )(std::basic_ostream< charT, std::char_traits< charT > > &, const std::string &) |
Pointer to function that does a manipulation on a ostream with a string argument. | |
Friends | |
template<typename charTx > | |
std::basic_ostream< charTx, std::char_traits< charTx > > & | operator<< (std::basic_ostream< charTx, std::char_traits< charTx > > &os, const UTime_stream_manip< charTx > &m) |
<< operator of this manipulator on an ostream. | |
class for changing output format of UTime on ostream, in a way like the standard stream manipulator classes.
This supports doing: using namespace nidas::util; cout << setTZ<char>("PST8PDT") << setDefaultFormat("%H%M%S") << ut << endl; or (if we use the template class): cout << setTZ<char>("PST8PDT") << setDefaultFormat<char>("%H%M%S") << ut << endl;
|
inline |
Constructor of manipulator.
f | A function that returns a reference to an ostream, with arguments of the ostream reference and a string. |
|
friend |
<< operator of this manipulator on an ostream.
Invokes the function that was passed to the constructor.
|
private |
Pointer to function that does a manipulation on a ostream with a string argument.
|
private |