00001 // Emacs -*- C++ -*- 00002 #ifndef ANAPHE_ANNOTATIONNUMBERFORMATER 00003 #define ANAPHE_ANNOTATIONNUMBERFORMATER 1 00004 00005 #include <string> 00006 00007 namespace Anaphe { 00008 namespace AIDA_Histogram_native { 00009 00011 00012 class AnnotationNumberFormater 00013 { 00014 public: 00015 // Default number of precision digits 00016 static const int defaultPrecisionDigits = 4; 00017 00018 AnnotationNumberFormater(); 00019 ~AnnotationNumberFormater() {}; 00020 std::string formatInteger( int number ) const; 00021 std::string formatDouble( double number ) const; 00022 00023 void setPrecisionDigits( int digits ); 00024 int precisionDigits() const; 00025 00026 private: 00027 int m_precisionDigits; 00028 00029 }; 00030 00031 } 00032 } 00033 00035 static const Anaphe::AIDA_Histogram_native::AnnotationNumberFormater anaphe_annotationNumberFormater; 00036 00037 00038 #endif /* ifndef ANAPHE_ANNOTATIONNUMBERFORMATER */