fmtr.hpp

Go to the documentation of this file.
00001 #ifndef IOF_FORMATTER_H
00002 #define IOF_FORMATTER_H
00003 
00018 #include "iof/fmtr_out.hpp"
00019 #include "iof/fmtr_in.hpp"
00020 
00021 
00022 namespace iof
00023 {
00024 
00025 
00033 class fmtr
00034 {
00035 public:
00036     fmtr(): my_fmt("") {}
00037     explicit fmtr(const std::string& fmt): my_fmt(fmt) {}
00038     const std::string& fmt() const {return my_fmt;}
00039     
00040 private:
00041     const std::string my_fmt;
00042 };
00043 
00044 
00045 inline iof_private::fmtr_out 
00046 operator<<(std::ostream& out, const fmtr& fmtr)
00047 {
00048     return iof_private::fmtr_out(out, fmtr.fmt(), true);
00049 }
00050 
00051 
00052 inline iof_private::fmtr_in
00053 operator>>(std::istream& in, const fmtr& fmtr)
00054 {
00055     return iof_private::fmtr_in(in, fmtr.fmt());
00056 }
00057 
00058 
00059 } // namespace iof
00060 
00061 
00062 #endif // IOF_FORMATTER_H
00063 

Generated on Fri Nov 24 16:16:01 2006 for IOF Library by doxygen 1.5.1-p1
Thanks to SourceForge.net Logo for hosting