home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK11 / MFC / SAMPLES / TESTSERV / SERVDOC.H$ / servdoc
Encoding:
Text File  |  1992-03-07  |  1.4 KB  |  50 lines

  1. // servdoc.h : This file contains prototypes for the CServDoc class
  2. //              which inherits from COleServerDoc.
  3. //
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and Microsoft
  10. // QuickHelp documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15.  
  16. #ifndef __SERVDOC_H__
  17. #define __SERVDOC_H__
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CServDoc:
  21.  
  22. class CServDoc : public COleServerDoc
  23. {
  24. public:
  25.     CServDoc(LPCSTR lpszDoc);
  26.     CServDoc() { m_DocName = "blank"; m_pItem = NULL; };
  27.     ~CServDoc() { m_pItem = NULL; };
  28.  
  29.     OLESTATUS BeginRevoke() { return COleServerDoc::BeginRevoke(); };
  30.  
  31. #ifdef _DEBUG
  32.     virtual void AssertValid() const;
  33.     virtual void Dump (CDumpContext &dc) const;
  34. #endif
  35.  
  36.     CServItem* m_pItem;
  37.     CString m_DocName;
  38.  
  39. // Overridables for OLE server
  40. protected:
  41.     virtual COleServerItem* OnGetItem(LPCSTR lpszObjname);
  42.     virtual COleServerItem* OnGetDocument ();
  43.     virtual COleServerItem* GetNextItem(POSITION &rPosition);
  44. };
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47.  
  48. #endif // __SERVDOC_H__
  49.  
  50.