home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / SUREF.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  3KB  |  99 lines

  1. /* @(#)Z 1.4 com/src/bento/SURef.h, odstorage, od96os2, odos29646d 96/11/15 15:29:29 (96/10/29 09:13:40) */
  2. /*====START_GENERATED_PROLOG======================================
  3.  */
  4. /*
  5.  *   COMPONENT_NAME: odstorage
  6.  *
  7.  *   CLASSES:   SURefKeeper
  8.  *
  9.  *   ORIGINS: 82,27
  10.  *
  11.  *
  12.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13.  *   All Rights Reserved
  14.  *   Licensed Materials - Property of IBM
  15.  *   US Government Users Restricted Rights - Use, duplication or
  16.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17.  *       
  18.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24.  *   OR PERFORMANCE OF THIS SOFTWARE.
  25.  */
  26. /*====END_GENERATED_PROLOG========================================
  27.  */
  28.  
  29. /*
  30.     File:        SURef.h
  31.  
  32.     Contains:    SURefKeeper header
  33.  
  34.     Written by:    Vincent Lo
  35.  
  36.     Copyright:    ⌐ 1995 by Apple Computer, Inc., all rights reserved.
  37.  
  38.     Change History (most recent first):
  39.  
  40.          <1>     1/26/95    VL        first checked in
  41.     To Do:
  42.     
  43. */
  44.  
  45. #ifndef _SUREF_
  46. #define _SUREF_
  47.  
  48. #ifndef _ODTYPES_
  49. #include <ODTypes.h>
  50. #endif
  51.  
  52. #ifndef __CM_API__
  53. #include <CMAPI.h>
  54. #endif
  55.  
  56. //==============================================================================
  57. // Classes defined in this interface
  58. //==============================================================================
  59. class SURefKeeper;
  60.  
  61. //==============================================================================
  62. // Classes used by this interface
  63. //==============================================================================
  64. class CMStorageUnit;
  65.  
  66. class SURefKeeper
  67. {
  68. public:
  69.  
  70.     SURefKeeper(CMStorageUnit* su);
  71.     
  72.     ~SURefKeeper();
  73.     
  74.     void Internalize();
  75.     
  76.     void Externalize();
  77.  
  78.     void GetNextSURef(ODStorageUnitRef ref, ODBoolean strong);
  79.     
  80.     void Reset(ODStorageUnitRef ref);
  81.     
  82.     ODBoolean IsWeakSURef(ODStorageUnitRef ref);
  83.     
  84.     ODBoolean IsStrongSURef(ODStorageUnitRef ref);
  85.     
  86.     void InvalidateSURef(ODStorageUnitRef ref);
  87.     
  88.     ODBoolean IsValidSURef(ODStorageUnitRef ref);
  89.  
  90. protected:
  91.  
  92.     CMStorageUnit*    fSU;
  93.     ODBoolean        fDirty;
  94.     ODULong            fCurrentSURef;
  95. };
  96.  
  97.  
  98. #endif // _SUREF_
  99.