source: trunk/src/ole32/oString.h@ 198

Last change on this file since 198 was 198, checked in by davidr, 26 years ago

String management class

File size: 1.2 KB
Line 
1
2#if !defined(OSTRING_INCLUDED)
3#define OSTRING_INCLUDED
4
5class oStringA
6{
7private:
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
20protected:
21 void freeBuf();
22 void getBuf(long newLen);
23 void adjBuf(long newLen);
24 long calcBufLen(long newLen);
25
26public:
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.