home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / BOCOLE.PAK / BOLECOMP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.4 KB  |  58 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectComponents
  3. // Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
  4. //
  5. // $Revision:   2.3  $
  6. //
  7. //  Provides a default IUnknownMain implementation for all Bolero components 
  8. //  (helper objects and some private objects.
  9. //
  10. //    IUnknownMain is a way to create aggregatable components which support 
  11. //    IUnknown-based interfaces via multiple-inheritance. 
  12. //----------------------------------------------------------------------------
  13. #ifndef _BOLECOMP_H
  14. #define _BOLECOMP_H
  15.  
  16. #ifndef _BOLE_H
  17. #include "BOle.h"
  18. #endif
  19.  
  20. #ifndef _OLEDEBUG_H
  21. #include "OleDebug.h"
  22. #endif
  23.  
  24. class _ICLASS BOleClassManager;
  25.  
  26. PREDECLARE_INTERFACE( BOleComponent );
  27.  
  28. class _ICLASS BOleComponent : public IBUnknownMain 
  29. #ifdef OLEDBG
  30. , public cDebug
  31. #endif
  32. {
  33. public:
  34.     BOleClassManager * pFactory;        
  35.  
  36. private:
  37.     unsigned long nReferences;
  38.  
  39. protected:
  40.     IBUnknownMain * pObjOuter;        
  41.     BOleComponent(BOleClassManager *pF, PIBUnknownMain pObj);
  42.     virtual ~BOleComponent();
  43.  
  44. public:
  45.  
  46.     // IUnknown methods delegate aggregator's IUnknownMain
  47.     //
  48.     DEFINE_IUNKNOWN(pObjOuter);
  49.     
  50.     // IUnknownMain methods
  51.     //
  52.     virtual HRESULT _IFUNC QueryInterfaceMain(REFIID iid, LPVOID FAR* pif);
  53.     virtual ULONG _IFUNC AddRefMain();
  54.     virtual ULONG _IFUNC ReleaseMain();
  55. };
  56.  
  57. #endif
  58.