Changeset 290 for trunk/src


Ignore:
Timestamp:
Jul 12, 1999, 2:17:20 AM (26 years ago)
Author:
davidr
Message:

Added Unicode variant of string management class.
Added RunningObjectTable definitions.

Location:
trunk/src/ole32
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/oString.h

    r198 r290  
    33#define OSTRING_INCLUDED
    44
    5 class oStringA
     5class oStringBase
    66{
    7 private:
    8     LPSTR       m_strBuf;       // Buffer for string data.
    9    
     7protected:
     8    char *      m_strBuf;       // Buffer.
     9
    1010    long        m_bufLen;       // Current allocated length
    11                                 // of buffer
     11                                // of buffer (bytes)
    1212                               
     13    long        m_bytePerChar;  // Number of bytes per character.
    1314    long        m_strLen;       // Length of string
    1415                                // incl. zero terminator
     
    1819    static long blockSize;
    1920
    20 protected:
     21    oStringBase(long bytePerChar);
     22    virtual ~oStringBase();
     23
    2124    void freeBuf();
    2225    void getBuf(long newLen);
    2326    void adjBuf(long newLen);
    2427    long calcBufLen(long newLen);
     28};
    2529
     30class oStringA : public oStringBase
     31{
    2632public:
    2733    oStringA(void);
     
    2935    oStringA(LPCWSTR pUnicode);
    3036    oStringA(LPCSTR pAscii);
     37    oStringA(REFCLSID pclsId);
    3138    oStringA(const oStringA &ref);
    32     virtual ~oStringA();
    3339
    3440    operator LPSTR();
    3541
    36     // Equality
     42    // Assignment
    3743    oStringA operator =  (const oStringA & string);
    3844    oStringA operator =  (LPCSTR pAscii);
    3945    oStringA operator =  (LPCWSTR pUnicode);
     46    oStringA operator =  (REFCLSID pClsId);
    4047
    4148    // Concatenation
     
    4451    oStringA operator +  (LPCWSTR pUnicode);
    4552
    46     // Concatenation
     53    // Concatenation & Assignment.
    4754    oStringA operator += (const oStringA & string);
    4855    oStringA operator += (LPCSTR pAscii);
     
    5158};
    5259
     60class oStringW : public oStringBase
     61{
     62public:
     63    oStringW(void);
     64    oStringW(int defLen);
     65    oStringW(LPCWSTR pUnicode);
     66    oStringW(const wchar_t * pUnicode);
     67    oStringW(LPCSTR pAscii);
     68    oStringW(REFCLSID pclsId);
     69    oStringW(const oStringW &ref);
     70
     71    operator LPWSTR();
     72
     73    // Assignment
     74    oStringW operator =  (const oStringW & string);
     75    oStringW operator =  (LPCSTR pAscii);
     76    oStringW operator =  (LPCWSTR pUnicode);
     77    oStringW operator =  (const wchar_t * pUnicode);
     78    oStringW operator =  (REFCLSID pClsId);
     79
     80    // Concatenation
     81    oStringW operator +  (const oStringW & string);
     82    oStringW operator +  (LPCSTR pAscii);
     83    oStringW operator +  (LPCWSTR pUnicode);
     84    oStringW operator +  (const wchar_t * pUnicode);
     85
     86    // Concatenation & Assignment.
     87    oStringW operator += (const oStringW & string);
     88    oStringW operator += (LPCSTR pAscii);
     89    oStringW operator += (LPCWSTR pUnicode);
     90    oStringW operator += (const wchar_t * pUnicode);
     91
     92};
     93
    5394#endif // OSTRING_INCLUDED
  • trunk/src/ole32/ole32.h

    r202 r290  
    1515
    1616// ><DJR 17.05.99 Force to use C-interfaces for now to prevent CALLBACK definition compiler error
    17 #define CINTERFACE
     17#define CINTERFACE 1
    1818
    1919// ><DJR 17.05.99 Move standard includes to before os2win.h [memcmp]
     
    2323#include <string.h>
    2424#include <memory.h>
     25#include <wchar.h>
    2526
    2627// ><DJR 17.05.99 Prevent CALLCONV becoming _System
     28#include <win/wtypes.h>
    2729#include <winbase.h>
    2830#include <uconv.h>
Note: See TracChangeset for help on using the changeset viewer.