00001 #ifndef STSTRINGAUX_H
00002 #define STSTRINGAUX_H
00003 #include <string>
00004
00005 class StString : public std::string {
00006 public:
00007 StString(){fPrec=0;}
00008
00009 StString& operator<<(const char *txt){ if(txt) { (*this)+=txt; }; return *this;}
00010 StString& operator<<(int I);
00011 StString& operator<<(unsigned int I);
00012 StString& operator<<(short I);
00013 StString& operator<<(unsigned short I);
00014 StString& operator<<(long I);
00015 StString& operator<<(unsigned long I);
00016 StString& operator<<(long long I);
00017 StString& operator<<(unsigned long long I);
00018 StString& operator<<(float F);
00019 StString& operator<<(double D);
00020 void precision(int prec){fPrec = prec;}
00021
00022 const std::string &str(){return *((const std::string*)this);}
00023
00024 private:
00025 int fPrec;
00026
00027 };
00028 #define stendl ("\n")
00029 #endif