home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 10 / ioProg_10.iso / soft / optima / hpp.z / WOLEBSTR.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-07  |  2.2 KB  |  86 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,4);
  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=NULL );
  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.         operator long char *() const;
  68.  
  69.     public:
  70.  
  71.         /**********************************************************
  72.          * Data Members
  73.          *********************************************************/
  74.     
  75.         long char *     _bstring;
  76.  
  77. };
  78.  
  79. #ifndef _WNO_PRAGMA_PUSH
  80. #pragma enum pop;
  81. #pragma pack(pop);
  82. #endif
  83.  
  84. #endif // _WOLEBSTR_HPP_INCLUDED
  85.  
  86.