home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / BOCOLE.PAK / BOLECOMP.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  1KB  |  57 lines

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