Line | |
---|
1 |
|
---|
2 | #if !defined(OSTRING_INCLUDED)
|
---|
3 | #define OSTRING_INCLUDED
|
---|
4 |
|
---|
5 | class oStringA
|
---|
6 | {
|
---|
7 | private:
|
---|
8 | LPSTR m_strBuf; // Buffer for string data.
|
---|
9 |
|
---|
10 | long m_bufLen; // Current allocated length
|
---|
11 | // of buffer
|
---|
12 |
|
---|
13 | long m_strLen; // Length of string
|
---|
14 | // incl. zero terminator
|
---|
15 |
|
---|
16 | HANDLE m_Heap; // heap handle.
|
---|
17 |
|
---|
18 | static long blockSize;
|
---|
19 |
|
---|
20 | protected:
|
---|
21 | void freeBuf();
|
---|
22 | void getBuf(long newLen);
|
---|
23 | void adjBuf(long newLen);
|
---|
24 | long calcBufLen(long newLen);
|
---|
25 |
|
---|
26 | public:
|
---|
27 | oStringA(void);
|
---|
28 | oStringA(int defLen);
|
---|
29 | oStringA(LPCWSTR pUnicode);
|
---|
30 | oStringA(LPCSTR pAscii);
|
---|
31 | oStringA(const oStringA &ref);
|
---|
32 | virtual ~oStringA();
|
---|
33 |
|
---|
34 | operator LPSTR();
|
---|
35 |
|
---|
36 | // Equality
|
---|
37 | oStringA operator = (const oStringA & string);
|
---|
38 | oStringA operator = (LPCSTR pAscii);
|
---|
39 | oStringA operator = (LPCWSTR pUnicode);
|
---|
40 |
|
---|
41 | // Concatenation
|
---|
42 | oStringA operator + (const oStringA & string);
|
---|
43 | oStringA operator + (LPCSTR pAscii);
|
---|
44 | oStringA operator + (LPCWSTR pUnicode);
|
---|
45 |
|
---|
46 | // Concatenation
|
---|
47 | oStringA operator += (const oStringA & string);
|
---|
48 | oStringA operator += (LPCSTR pAscii);
|
---|
49 | oStringA operator += (LPCWSTR pUnicode);
|
---|
50 |
|
---|
51 | };
|
---|
52 |
|
---|
53 | #endif // OSTRING_INCLUDED
|
---|
Note:
See
TracBrowser
for help on using the repository browser.