home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / imodel.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.7 KB  |  99 lines

  1. /*******************************************************************************
  2. * FILE NAME: imodel.hpp                                                        *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *   Declaration of the classes:                                                *
  6. *     IModel                                                                   *
  7. *                                                                              *
  8. * COPYRIGHT:                                                                   *
  9. *   IBM Open Class Library                                                     *
  10. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  11. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  12. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  13. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  14. *                                                                              *
  15. *   Portions or this component are based on work originating from Taligent.    *
  16. *   (C) Copyright Taligent, Inc. 1996 - All rights reserved.                   *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _IMODEL_
  20. #define _IMODEL_
  21.  
  22. #include <ivbase.hpp>
  23. #include <imetatyp.hpp>
  24. #include <istring.hpp>
  25.  
  26. // forward references
  27. class IComponent;
  28. class IBaseStream;
  29. class INotificationEvent;
  30. class INotifier;            
  31.  
  32. // classes defined in this module
  33. class IModel;
  34.  
  35. #pragma pack(4)
  36.  
  37.  
  38. /*******************************************************************************
  39. *                                                                              *
  40. *   The IModel family of classes support an interface for the document         *
  41. *   model.                                                                     *
  42. *                                                                              *
  43. *******************************************************************************/
  44.  
  45. class IModel : public IVBase {
  46. public:
  47.  
  48. /*----------------------- Initialization/Destruction -------------------------*/
  49.  
  50.     virtual void            attachTo( IComponent& );
  51.     virtual                 ~IModel();
  52.  
  53.  
  54. /*--------------------------- Change notification ----------------------------*/
  55.  
  56.     virtual void            notifyOfChange( const INotificationEvent& );
  57.     virtual Boolean         hasChanged() const;
  58.     virtual void            setChanged( Boolean changed = true );
  59.     virtual INotifier&      notifier() const;
  60.                             operator INotifier& () const;
  61.  
  62.  
  63. /*--------------------------- Streaming operators ----------------------------*/
  64.  
  65.     virtual IBaseStream&    operator>>=( IBaseStream& ) const;
  66.     virtual IBaseStream&    operator<<=( IBaseStream& );
  67.  
  68. /*------------------------------ Informational -------------------------------*/
  69.  
  70.     IComponent&             component() const;
  71.  
  72. #ifdef IC_LIBRARYUSEONLY
  73.     virtual void            fileRenamed( const IString& );
  74.  
  75.     TypeExtensionDeclarationsMacro(IModel)
  76. #endif
  77.  
  78. protected:
  79. /*--------------------------- Construction/Copy ------------------------------*/
  80.  
  81.                             IModel();
  82.                             IModel( const IModel& );
  83.     
  84. private:
  85.     IModel&                 operator=( const IModel& );
  86.     
  87.     enum Version            { kOriginalVersion };
  88.     IComponent*             fpComponent;
  89.     
  90. };
  91.  
  92.   #include <imodel.inl>
  93.  
  94.  
  95. #pragma pack()
  96.  
  97.  
  98. #endif // _IMODEL_
  99.