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

  1. #ifndef _ICONTEXT_
  2. #define _ICONTEXT_
  3. /*******************************************************************************
  4. * FILE NAME: icontext.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of class(es):                                                  *
  8. *     IContext                                                                 *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *   Portions or this component are based on work originating from Taligent.    *
  18. *   (C) Copyright Taligent, Inc. 1996 - All rights reserved.                   *
  19. *                                                                              *
  20. *******************************************************************************/
  21. #include <ibase.hpp>
  22.  
  23. class IContextNumberSet;
  24. class IContextElementSet;
  25.  
  26.  
  27. #define kFastObjectsArraySize 6
  28.  
  29.  
  30. #pragma pack(4)
  31.  
  32.  
  33. class IContext : public IBase {
  34. typedef IBase
  35.   Inherited;
  36. public:
  37. /*------------------------------ Type Definitions ----------------------------*/
  38. typedef unsigned long
  39.   ObjectNumber;
  40.  
  41. /*------------------------------- Constructors -------------------------------*/
  42.    IContext  ( );
  43. virtual
  44.   ~IContext  ( );
  45.  
  46. /*--------------------------- Streaming Support ------------------------------*/
  47. // Methods used internally for streaming.  Not for general public consumption
  48. public:
  49. unsigned long
  50.   count         ( );
  51. const void
  52.  *find          ( ObjectNumber objectNumber );
  53. ObjectNumber 
  54.   add           ( const void*  object, 
  55.                   Boolean&     objectExistsFlag);
  56. IContext
  57.  &reset         ( );
  58.  
  59. private:
  60. /*------------------------------ Hidden Members ------------------------------*/
  61.   IContext ( const IContext& context );
  62. const IContext& operator=(const IContext&);
  63.  
  64. /*----------------------------- Private --------------------------------------*/
  65. IContextNumberSet
  66.  *fNumberToObject;
  67. IContextElementSet
  68.  *fObjectToNumber;
  69.  
  70. void
  71.  *fFastObjects[kFastObjectsArraySize];
  72. unsigned long
  73.   fCount;
  74.  
  75.  
  76. }; // IContext
  77.  
  78.  
  79. #pragma pack()
  80.  
  81. #endif // _ICONTEXT_
  82.  
  83.