RuntimeFormatter.h
00001 #ifndef gridripper_util_RuntimeFormatter_h
00002 #define gridripper_util_RuntimeFormatter_h
00003
00004 #include <string>
00005
00006 namespace gridripper { namespace util {
00007
00008 using namespace std;
00009
00015 class RuntimeFormatter
00016 {
00017 public:
00018 enum {SS = 0, HMS = 1};
00019
00020 private:
00021 int options;
00022 int width;
00023 int precision;
00024
00025 public:
00032 RuntimeFormatter(int opts, int width, int prec);
00033
00041 static string format(int opts, int width, int prec, double t);
00042
00044 string format(double t) const;
00045 };
00046
00047 } }
00048
00049 #endif