// Filename:- sstring.h // // Gil's string template, used to replace Microsoft's vrsion which doesn't compile under certain stl map<> // conditions... #ifndef SSTRING_H #define SSTRING_H template class sstring { struct SStorage { char data[MaxSize]; }; SStorage mStorage; public: /* don't figure we need this template sstring(const sstring &o) { assert(strlen(o.mStorage.data) &o) { //strcpy(mStorage.data,o.mStorage.data); Q_strncpyz(mStorage.data,o.mStorage.data,sizeof(mStorage.data)); } sstring(const char *s) { //assert(strlen(s) sstring & operator =(const sstring &o) { assert(strlen(o.mStorage.data) & operator=(const sstring &o) { //strcpy(mStorage.data,o.mStorage.data); Q_strncpyz(mStorage.data,o.mStorage.data,sizeof(mStorage.data)); return *this; } sstring & operator=(const char *s) { assert(strlen(s) &o) const { if (!strcmpi(mStorage.data,o.mStorage.data)) { return true; } return false; } bool operator!=(const sstring &o) const { if (strcmpi(mStorage.data,o.mStorage.data)!=0) { return true; } return false; } bool operator<(const sstring &o) const { if (strcmpi(mStorage.data,o.mStorage.data)<0) { return true; } return false; } bool operator>(const sstring &o) const { if (strcmpi(mStorage.data,o.mStorage.data)>0) { return true; } return false; } }; typedef sstring sstring_t; #endif // #ifndef SSTRING_H /////////////////// eof ////////////////////