Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: memento.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #pragma once
  11. #ifndef _MEMENTO_H_
  12. #define _MEMENTO_H_
  13. // forward declarations
  14. class CMemento;
  15. /*+-------------------------------------------------------------------------*
  16. * class CMemento
  17. *
  18. * PURPOSE: Encapsulates the settings needed to restore a node/view combination.
  19. *
  20. *+-------------------------------------------------------------------------*/
  21. class CMemento : public CSerialObject, public CXMLObject
  22. {
  23. public:
  24. CBookmark &GetBookmark() {return m_bmTargetNode;}
  25. CViewSettings &GetViewSettings() {return m_viewSettings;}
  26. bool operator==(const CMemento& memento);
  27. bool operator!=(const CMemento& memento);
  28. protected:
  29. // CSerialObject methods
  30. virtual UINT GetVersion() {return 1;}
  31. virtual HRESULT ReadSerialObject (IStream &stm, UINT nVersion);
  32. virtual void Persist(CPersistor& persistor);
  33. DEFINE_XML_TYPE(XML_TAG_MEMENTO);
  34. private:
  35. CViewSettings m_viewSettings;
  36. CBookmark m_bmTargetNode;
  37. };
  38. #endif // _MEMENTO_H_