00001 00002 // SFString.h // 00004 00005 #ifndef SFSTRING_H 00006 #define SFSTRING_H 00007 00008 #include "Platform.h" 00009 00010 #include <string> 00011 00012 namespace X3DTK { 00013 00016 00017 class SFString : public std::string 00018 { 00019 public: 00021 SFString(); 00023 SFString(const char *s); 00025 SFString(const unsigned char *s); 00027 SFString(const std::string &s); 00029 SFString(const SFString &s); 00030 00032 operator const char *() const; 00034 int toInt() const; 00036 unsigned int toUint() const; 00038 float toFloat() const; 00040 double toDouble() const; 00042 SFString lower() const; 00044 SFString upper() const; 00046 SFString getName() const; 00048 SFString getExtension() const; 00050 SFString getFile() const; 00052 SFString getPath() const; 00053 00055 static SFString number(float f); 00057 static SFString number(double d); 00059 static SFString number(int i); 00061 static SFString number(unsigned int ui); 00062 }; 00063 00064 } 00065 00066 #endif