home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / acdf1 / acdfmdl1.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  1.7 KB  |  55 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //                      SAMPLE CODE
  3. //
  4. // FileName: ACDFMdl1.hpp
  5. //
  6. // ClassName: ACompDocFwkModel
  7. //
  8. // Description: Compound Document Framework (Simple Server) Model Header file
  9. //              This is a simple sample to demonstrate how to create a basic
  10. //              server application. The model class inherits from the IModel
  11. //              class.
  12. //              The server has a data string as its model data. This data
  13. //              is set to "Hello World" when the model is constructed.
  14. //              
  15. ///////////////////////////////////////////////////////////////////////////////
  16. #ifndef _COMPDOCFWK_MODEL_
  17. #define _COMPDOCFWK_MODEL_
  18.  
  19. #ifdef IC_TRACE_DEVELOP
  20.     #include <itrace.hpp>
  21. #else
  22.     #define IFUNCTRACE_DEVELOP()
  23.     #define ITRACE_DEVELOP(x)
  24. #endif
  25.  
  26. #include <istring.hpp>
  27. #include <imodel.hpp>
  28.  
  29. class ACompDocFwkModel : public IModel  // Server inherits from the IModel
  30. {
  31. public:
  32.     TypeExtensionDeclarationsMacro(ACompDocFwkModel) // Type Extention for Streaming
  33.  
  34.                             ACompDocFwkModel();
  35.     virtual                 ~ACompDocFwkModel();
  36.     
  37.     virtual IString         getString() const;
  38.     virtual Boolean         setString(const IString&);
  39.  
  40.     virtual IBaseStream&    operator>>=( IBaseStream& towhere ) const;
  41.     virtual IBaseStream&    operator<<=( IBaseStream& fromwhere );
  42.  
  43. protected:
  44.                             ACompDocFwkModel( const ACompDocFwkModel&);
  45.  
  46. private:
  47.     enum                    { kOriginalVersion };
  48.     ACompDocFwkModel&       operator=(const ACompDocFwkModel&);
  49.  
  50.     IString                 fDataString;
  51. };
  52.  
  53. #endif
  54.     
  55.