00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MECHSYS_NUMSTREAMS_H
00023 #define MECHSYS_NUMSTREAMS_H
00024
00025 #include <iostream>
00026 #include <iomanip>
00027
00028 namespace Util
00029 {
00030
00031 class _4 {};
00032 std::ostream & operator<< (std::ostream & os, _4 const & dummy)
00033 { os<<" "<<std::setw(4); return os; }
00034
00035 class _6 {};
00036 std::ostream & operator<< (std::ostream & os, _6 const & dummy)
00037 { os<<" "<<std::setw(6); return os; }
00038
00039 class _6_3 {};
00040 std::ostream & operator<< (std::ostream & os, _6_3 const & dummy)
00041 { os<<" "<<std::setw(7)<<std::fixed<<std::setprecision(3); return os; }
00042
00043 class _12_6 {};
00044 std::ostream & operator<< (std::ostream & os, _12_6 const & dummy)
00045 { os<<" "<<std::setw(13)<<std::fixed<<std::setprecision(6); return os; }
00046
00047 class _3s {};
00048 std::ostream & operator<< (std::ostream & os, _3s const & dummy)
00049 { os<<" "<<std::setw(12)<<std::scientific<<std::setprecision(3); return os; }
00050
00051 class _8s {};
00052 std::ostream & operator<< (std::ostream & os, _8s const & dummy)
00053 { os<<" "<<std::setw(17)<<std::scientific<<std::setprecision(8); return os; }
00054
00055 class _a {};
00056 std::ostream & operator<< (std::ostream & os, _a const & dummy)
00057 { os<<" "<<std::boolalpha; return os; }
00058
00059 };
00060
00061 #endif // MECHSYS_NUMSTREAMS_H