05.11.2011 - stable version, 0.1.0, self-test program, work at GCC 2.95 - 4.5, VC 2010, MinGW, Linux, Windows, QNX
This commit is contained in:
23
pistring.h
23
pistring.h
@@ -9,7 +9,7 @@ class PIStringList;
|
||||
class PIString: public PIVector<PIChar>
|
||||
{
|
||||
public:
|
||||
PIString() {;}
|
||||
PIString() {piMonitor.strings++; piMonitor.containers--;}
|
||||
|
||||
//inline PIString & operator +=(const char c) {push_back(c); return *this;}
|
||||
PIString & operator +=(const PIChar c) {push_back(c); return *this;}
|
||||
@@ -21,16 +21,17 @@ public:
|
||||
PIString & operator +=(const wstring & str);
|
||||
|
||||
//PIString(const char c) {*this += c;}
|
||||
PIString(const PIChar c) {*this += c;}
|
||||
PIString(const char * str) {*this += str;}
|
||||
PIString(const wchar_t * str) {*this += str;}
|
||||
PIString(const string & str) {*this += str;}
|
||||
PIString(const wstring & str) {*this += str;}
|
||||
PIString(const PIByteArray & ba) {*this += ba;}
|
||||
PIString(const char * str, const int len) {*this += string(str, len);}
|
||||
PIString(const int len, const char c) {for (int i = 0; i < len; ++i) push_back(c);}
|
||||
PIString(const int len, const PIChar & c) {for (int i = 0; i < len; ++i) push_back(c);}
|
||||
PIString(const PIString & str) {*this += str;}
|
||||
PIString(const PIChar c) {piMonitor.strings++; piMonitor.containers--;*this += c;}
|
||||
PIString(const char * str) {piMonitor.strings++; piMonitor.containers--;*this += str;}
|
||||
PIString(const wchar_t * str) {piMonitor.strings++; piMonitor.containers--;*this += str;}
|
||||
PIString(const string & str) {piMonitor.strings++; piMonitor.containers--;*this += str;}
|
||||
PIString(const wstring & str) {piMonitor.strings++; piMonitor.containers--;*this += str;}
|
||||
PIString(const PIByteArray & ba) {piMonitor.strings++; piMonitor.containers--;*this += ba;}
|
||||
PIString(const char * str, const int len) {piMonitor.strings++; piMonitor.containers--;*this += string(str, len);}
|
||||
PIString(const int len, const char c) {piMonitor.strings++; piMonitor.containers--;for (int i = 0; i < len; ++i) push_back(c);}
|
||||
PIString(const int len, const PIChar & c) {piMonitor.strings++; piMonitor.containers--;for (int i = 0; i < len; ++i) push_back(c);}
|
||||
PIString(const PIString & str) {piMonitor.strings++; piMonitor.containers--;*this += str;}
|
||||
~PIString() {piMonitor.strings--; piMonitor.containers++;}
|
||||
|
||||
operator const char*() {return data();}
|
||||
operator const string() {if (size() == 0) return string(); string s; for (int i = 0; i < length(); ++i) s.push_back(at(i).toAscii()); return s;}
|
||||
|
||||
Reference in New Issue
Block a user