class for changing output format of UTime on ostream, in a way like the standard stream manipulator classes.
More...
#include <UTime.h>
|
| 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. More...
|
|
|
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. More...
|
|
|
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. More...
|
|
template<typename charT>
class nidas::util::UTime_stream_manip< charT >
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;
Constructor of manipulator.
- Parameters
-
f | A function that returns a reference to an ostream, with arguments of the ostream reference and a string. |
template<typename charT>
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 |
|
) |
| |
|
friend |
<< operator of this manipulator on an ostream.
Invokes the function that was passed to the constructor.
template<typename charT>
std::basic_ostream<charT,std::char_traits<charT> >&(* nidas::util::UTime_stream_manip< charT >::_f)(std::basic_ostream< charT, std::char_traits< charT > > &, const std::string &) |
|
private |
Pointer to function that does a manipulation on a ostream with a string argument.
The documentation for this class was generated from the following file: