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 getName() const; 00044 SFString getExtension() const; 00046 SFString getFile() const; 00048 SFString getPath() const; 00049 00051 static SFString number(float f); 00053 static SFString number(double d); 00055 static SFString number(int i); 00057 static SFString number(unsigned int ui); 00058 }; 00059 00060 } 00061 00062 #endif