00001 00002 // SFString.h // 00004 00005 #ifndef SFSTRING_H 00006 #define SFSTRING_H 00007 00008 #include <string> 00009 00010 namespace X3DTK { 00011 00014 00015 class SFString : public std::string 00016 { 00017 public: 00019 SFString(); 00021 SFString(const char *s); 00023 SFString(const std::string &s); 00025 SFString(const SFString &s); 00026 00028 operator const char *() const; 00030 int toInt() const; 00032 unsigned int toUint() const; 00034 float toFloat() const; 00036 double toDouble() const; 00038 SFString lower() const; 00040 SFString upper() const; 00042 SFString getPath() const; 00043 00045 static SFString number(float f); 00047 static SFString number(double d); 00049 static SFString number(int i); 00051 static SFString number(unsigned int ui); 00052 }; 00053 00054 } 00055 00056 #endif