home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / WOLEBSTR.HPP < prev    next >
C/C++ Source or Header  |  1996-10-21  |  2KB  |  85 lines

  1. /*************************************************************************
  2.  *
  3.  * WBString -- OLE BString
  4.  *
  5.  *
  6.  *   Events:
  7.  *
  8.  *
  9.  *************************************************************************/
  10.  
  11. #ifndef _WOLEBSTR_HPP_INCLUDED
  12. #define _WOLEBSTR_HPP_INCLUDED
  13.  
  14. #ifndef _WNO_PRAGMA_PUSH
  15. #pragma pack(push,8);
  16. #pragma enum int;
  17. #endif
  18.  
  19. #ifndef _WSTRING_HPP_INCLUDED
  20. #  include "wstring.hpp"
  21. #endif
  22. #ifndef _WBUFFER_HPP_INCLUDED
  23. #  include "wbuffer.hpp"
  24. #endif
  25.  
  26. class WCMCLASS WBString {
  27.  
  28.     public:
  29.  
  30.         /**********************************************************
  31.          * Constructors and Destructors
  32.          *********************************************************/
  33.  
  34.         WBString( void );
  35.         WBString( const WChar * const str );
  36.         WBString( long char * wbstr );
  37.         WBString( const WString & wstring );
  38.         WBString( const WBuffer & buffer );
  39.         WBString( const WBString & wbstr );
  40.         WBString( WULong size, WUnicodeChar *buffer );
  41.  
  42.         virtual ~WBString();
  43.  
  44.         /**************************************************************
  45.          * Properties
  46.          **************************************************************/
  47.  
  48.         WUInt GetLength( void ) const;
  49.         WUInt GetByteLength( void ) const;
  50.         long char * GetHandle( void ) const;
  51.  
  52.         /**************************************************************
  53.          * Methods
  54.          **************************************************************/
  55.  
  56.         void Clear( void );
  57.  
  58.         /**************************************************************
  59.          * Operators
  60.          **************************************************************/
  61.  
  62.         WBString & operator=( const WBString & bstr );
  63.  
  64.         // cast operators
  65.         operator WString() const;
  66.         operator WBuffer() const;
  67.  
  68.     public:
  69.  
  70.         /**********************************************************
  71.          * Data Members
  72.          *********************************************************/
  73.     
  74.         long char *     _bstring;
  75.  
  76. };
  77.  
  78. #ifndef _WNO_PRAGMA_PUSH
  79. #pragma enum pop;
  80. #pragma pack(pop);
  81. #endif
  82.  
  83. #endif // _WOLEBSTR_HPP_INCLUDED
  84.  
  85.