home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ibmodf.zip / CUSTOMER.ZIP / CUSTMODL.HPP < prev    next >
Text File  |  1995-06-13  |  4KB  |  90 lines

  1.  
  2. #ifndef _CUSTMODL_
  3. #define _CUSTMODL_
  4.  
  5. /*******************************************************************************
  6. * FILE NAME: custmodl.hpp                                                      *
  7. *                                                                              *
  8. * DESCRIPTION:                                                                 *
  9. *   Declaration of the class(es):                                              *
  10. *     CustomerModel - This class is a example model class for parts whose data *
  11. *                    consists of several data objects written elsewhere.       *
  12. *                    This class can act as the model object for various view   *
  13. *                    objects, including MyFormView and MyContainerObject  .    *
  14. *                                                                              *
  15. * COPYRIGHT:                                                                   *
  16. *   Licensed Materials - Property of IBM                                       *
  17. *   (C) Copyright IBM Corporation 1994                                         *
  18. *   All Rights Reserved                                                        *
  19. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  20. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  21. *                                                                              *
  22. *******************************************************************************/
  23.  
  24. // ----- UICL Includes -----
  25. #include <oformp.hpp>       //always first (achieve proper definition of "true", "false", etc.)
  26.  
  27. #include <icust.hpp>
  28. #include <icompany.hpp>
  29. #include <iadd.hpp>
  30. #include <balance.hpp>
  31.  
  32. #ifndef _MYDEFS_H
  33.   #include <mydefs.h>
  34. #endif
  35.  
  36. // ----- OpenDoc Includes (if this part deals with OpenDoc directly anywhere) -----
  37.  
  38.  
  39. /*----------------------------------------------------------------------------  */
  40. /* Align classes on four byte boundary.                                         */
  41. /*----------------------------------------------------------------------------  */
  42. #pragma pack(4)
  43.  
  44. // Forward declarations for other classes:
  45. class MyCustomerView;
  46. class MySecondaryCustomerView;
  47. class ODStorageUnit;
  48. class Balance;
  49.  
  50.  
  51. class CustomerModel : public ODFModel {
  52. /*******************************************************************************
  53. * This class is an example class which derives from ODFModel.               *
  54. *******************************************************************************/
  55. public:
  56.    typedef ODFModel Inherited;
  57.  
  58.    CustomerModel();
  59.    virtual  ~CustomerModel();
  60.  
  61.    virtual ICustomer *customer();         //return the "customer" data content object
  62.    virtual ICompany *company();           //return the "company" data content object
  63.    virtual Balance *balance();                 //return the "balance" data content
  64.  
  65.  
  66.    virtual CustomerModel &openViews();
  67.    virtual CustomerModel &openView (IResourceId viewId);
  68.    virtual void Externalize();
  69.    virtual void InitPart (ODStorageUnit*);
  70.    virtual void InitPartFromStorage (ODStorageUnit*);
  71.  
  72. /*--------------------------------- Private ----------------------------------*/
  73. private:
  74.  
  75.    ICustomer *fCustomer;
  76.    ICompany *fCompany;
  77.    Balance *fBalance;
  78.    ODStorageUnit    *auxsu;
  79.  
  80. #pragma SOMClassName (*, "CustomerModel")
  81. }; // CustomerModel
  82.  
  83.  
  84. /*----------------------------------------------------------------------------*/
  85. /* Resume compiler default packing.                                           */
  86. /*----------------------------------------------------------------------------*/
  87. #pragma pack()
  88.  
  89. #endif /* _CUSTMODL_ */
  90.