home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / mcollect.idl < prev    next >
Text File  |  1999-02-22  |  7KB  |  187 lines

  1. //#  @(#) 2.13 src/somuc/mcollect.idl, somuc, som2.1 12/26/95 15:33:04 [7/30/96 14:49:59]
  2. //
  3. //   COMPONENT_NAME: somuc
  4. //
  5. //   ORIGINS: 82, 81, 27
  6. //
  7. //
  8. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996  
  9. //   All Rights Reserved
  10. //   Licensed Materials - Property of IBM
  11. //   US Government Users Restricted Rights - Use, duplication or
  12. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  13. //
  14. //   Copyright ⌐ 1988-92 Apple Computer, Inc.  All rights reserved.
  15.  
  16. /*
  17.  * CLASS_NAME: somf_MCollectible
  18.  *
  19.  * DESCRIPTION: The class somf_MCollectible defines the generic object class
  20.  *              from which all other classes are derived.  It is an abstract
  21.  *              class in that many subclasses will define some or all of the
  22.  *              methods presented below.
  23.  *
  24.  *
  25.  */
  26.  
  27. // This file was generated by the SOM Compiler.
  28. // FileName: MCollect.id2.
  29. // Generated using:
  30. //     SOM Precompiler spc: 6.13
  31. //     SOM Emitter emitidl.dll: 6.18
  32. #ifndef MCollect_idl
  33. #define MCollect_idl
  34.  
  35. #include <somobj.idl>
  36. #include <somcls.idl>
  37.  
  38. interface somf_MCollectible : SOMObject
  39. {
  40.  
  41.   const long kReasonableLowerBound = 5;
  42.  
  43.   typedef somMToken somf_MCollectibleCompareFn;
  44.   typedef somMToken somf_MCollectibleHashFn;
  45.  
  46.   //# since MCollectible has no data, and has no code in it's destructor, the
  47.   //# following destructor has been commented out.
  48.   //#  virtual ~MCollectible();
  49.  
  50.   //#   TStream* StreamOut(MCollectible* obj, TStream* towhere);
  51.   //# // Stream stuff
  52.   //# //   virtual TStream&   operator>>=(TStream& towhere) const;
  53.   //#
  54.   //#   TStream* StreamIn(MCollectible* obj, TStream* fromwhere);
  55.   //# // Stream stuff
  56.   //# //   virtual TStream&   operator<<=(TStream& towhere);
  57.   //#
  58.   //#   VersionInfo  ReadVersion(TStream* fromWhere);
  59.   //# //   VersionInfo  ReadVersion(TStream& fromWhere);
  60.  
  61.   //#  // OBSOLETE
  62.   //#  #ifndef NO_OBSOLETES
  63.   //#  virtual Boolean   StructureDoesNotHaveRepeatedReferences(Boolean deepFreeze = FALSE) const;
  64.   //#  #endif
  65.  
  66.   somf_MCollectible somfClone();
  67.  
  68.   // somfClone provides a general function for creating a new instance of this.
  69.   //#  virtual MCollectible* Clone() const;
  70.  
  71.   //# Clone is an overloaded method.  But since SOM can't handle overloaded
  72.   //# methods, and until TMemoryHeap is ported to SOM, the second definition
  73.   //# of Clone will be commented out.
  74.   //#  virtual MCollectible* Clone(TMemoryHeap*& theHeap) const;
  75.  
  76.   somf_MCollectible somfClonePointer(in somf_MCollectible clonee);
  77.  
  78.   // somfClonePointer returns a pointer to a Clone
  79.   //#  static MCollectible* ClonePointer(const MCollectible*);
  80.  
  81.   long somfHash();
  82.  
  83.   // somfHash returns a value suitable for use as a hashing probe for this.
  84.   // The default function will simply return the address of the object.
  85.   // The default function is almost certainly not adequate if you are overriding
  86.   // somfIsEqual because you need to make sure that all objects that "are equal"
  87.   // to each other return the same hash value.  For example, a TText object would
  88.   // return a hash value computed using the characters in the string instead of
  89.   // the address of the string.
  90.   //#    virtual  long     Hash() const;
  91.  
  92.   boolean somfIsEqual(in somf_MCollectible obj);
  93.  
  94.   // somfIsEqual returns TRUE if obj is isomorphic to this.  The default function
  95.   // will give you a nasty message.  For example, the somfIsEqual method
  96.   // for TText objects will do a string comparison.  All of the utility classes
  97.   // allow you to specify what methods to use when comparing objects for
  98.   // insertion, deletion, etc.
  99.   //#    virtual  Boolean    IsEqual(const MCollectible*) const;
  100.  
  101.   boolean somfIsSame(in somf_MCollectible obj);
  102.  
  103.   // The default function for somfIsSame is a pointer comparison
  104.   //#    virtual  Boolean   IsSame(const MCollectible*) const;
  105.  
  106.   //#  The following overloaded operator has been commented, instead of being
  107.   //#  turned into a method, because this operator is the same as the IsEqual
  108.   //#  method.
  109.   //#          Boolean   operator==(const MCollectible& obj) const;
  110.  
  111.   boolean somfIsNotEqual(in somf_MCollectible obj);
  112.  
  113.   // somfIsNotEqual returns TRUE if obj is NOT isomorphic to this.  It uses
  114.   // somfIsEqual, so overriding somfIsEqual will handle the logic of somfIsNotEqual too.
  115.   //#   Boolean   operator!=(const MCollectible& obj) const;
  116.  
  117.   //#  // Temporary stuff which may go away when we have hoops
  118.   //#  virtual void    PrintDebugInfo(Boolean verbose = FALSE) const;
  119.   //#
  120.   //#  // Temporary stuff until we have runtime support.
  121.   //#     ClassName*  GetClassNameAsToken() const;
  122.   //#     const char*  GetClassNameAsString() const;
  123.  
  124.   //# since MCollectible has no data, and has no code in it's constructor, the
  125.   //# following constructor has been commented out.
  126.   //#
  127.   //#  protected:
  128.   //#   MCollectible();
  129.  
  130.   //# public:
  131.   //#  // NOT FOR PUBLIC CONSUMPTION!!!
  132.   //#  virtual TClassMetaInformation* GetMetaInformation() const;
  133.   //#     const char*     WhichRawSharedLibrary();
  134.   //#     const TText*    WhichSharedLibrary();
  135.   //#     const TToken*    WhichSharedLibraryAsToken();
  136.   //#  virtual void*       GetAddressOfMetaInformation() const;
  137.  
  138.  
  139. #ifdef __SOMIDL__
  140.   implementation {
  141.  
  142.     releaseorder: somfClone,somfClonePointer,somfHash,somfIsEqual,somfIsSame,
  143.                   somfIsNotEqual;
  144.  
  145.     //# Class Modifiers
  146.     majorversion = 2;
  147.     minorversion = 1;
  148.     filestem     = mcollect;
  149.     dllname      = "somuc.dll";
  150.     classinit    = MCollectibleClassInit;
  151.  
  152.  
  153.     passthru C_xh_after =  ""
  154. ""
  155. "#define SOMF_NIL 0"
  156. ""
  157. "#define SOMF_CALL_COMPARE_FN(obj,token,parameter) (((somTD_somf_MCollectible_somfIsEqual) somResolve(obj,token))(obj, ev, parameter))"
  158. ""
  159. "#define SOMF_CALL_HASH_FN(obj,token) (((somTD_somf_MCollectible_somfHash) somResolve(obj,token))(obj, ev))"
  160. ""
  161. "#define kDeleted (somf_MCollectible*) 0xFFFFFFFF";
  162.  
  163.  
  164.     passthru C_h_after =  ""
  165. ""
  166. "#define SOMF_NIL 0"
  167. ""
  168. "#define SOMF_CALL_COMPARE_FN(obj,token,parameter) (((somTD_somf_MCollectible_somfIsEqual) somResolve(obj,token))(obj, ev, parameter))"
  169. ""
  170. "#define SOMF_CALL_HASH_FN(obj,token) (((somTD_somf_MCollectible_somfHash) somResolve(obj,token))(obj, ev))"
  171. ""
  172. "#define kDeleted (somf_MCollectible*) 0xFFFFFFFF";
  173.  
  174.     //# Method Modifiers
  175.     somfClone: nomodify;
  176.     somfClonePointer: nooverride;
  177.     somfHash: nomodify;
  178.     somfIsEqual: nomodify;
  179.     somfIsSame: nomodify;
  180.     somfIsNotEqual: nomodify;
  181.  
  182.   };
  183. #endif /* __SOMIDL__ */
  184. };
  185.  
  186. #endif  /* MCollect_idl */
  187.