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

  1. //#  @(#) 2.13 src/somuc/morder.idl, somuc, som2.1 1/16/96 11:32:18 [7/30/96 14:50:00]
  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_MOrderableCollectible
  18.  *
  19.  * DESCRIPTION: MOrderableCollectible should be mixed into objects which
  20.  *              might want to be ordered.
  21.  *
  22.  */
  23.  
  24. #ifndef MOrder_idl
  25. #define MOrder_idl
  26.  
  27. #include "mcollect.idl"
  28.  
  29.  
  30. interface somf_MOrderableCollectible : somf_MCollectible
  31. {
  32.   enum EComparisonResult { kLessThan, kEqual, kGreaterThan } ;
  33.  
  34. typedef somMToken somf_MOrderableCompareFn;
  35. typedef somMToken somf_MBetterOrderableCompareFn;
  36. typedef somf_MOrderableCollectible* somf_MOrderableCollectiblePtr;
  37.  
  38.  
  39.  
  40.   //# not converted to SOM since this class has no data to clean up
  41.   //#   virtual ~MOrderableCollectible();
  42.  
  43.   boolean somfIsGreaterThan(in somf_MOrderableCollectible obj);
  44.   // Returns TRUE if obj is "greater than" this.
  45.   //#   virtual Boolean IsGreaterThan(const MOrderableCollectible* obj) const;
  46.  
  47.   boolean somfIsLessThan(in somf_MOrderableCollectible obj);
  48.   // Returns TRUE if obj is "less than" this.
  49.   //#   virtual Boolean IsLessThan(const MOrderableCollectible* obj) const;
  50.  
  51.   EComparisonResult somfCompare(in somf_MOrderableCollectible obj);
  52.   // This method compares obj to this.
  53.   //#  virtual EComparisonResult Compare(const MOrderableCollectible* obj) const;
  54.  
  55.   //# Not ported since these methods are the same as IsGreaterThan and
  56.   //# IsLessThan
  57.   //#   Boolean operator<(const MOrderableCollectible& obj) const;
  58.   //#   Boolean operator>(const MOrderableCollectible& obj) const;
  59.  
  60.   boolean somfIsGreaterThanOrEqualTo(in somf_MOrderableCollectible obj);
  61.   // Returns TRUE if obj is "greater than" or "equal to" this.
  62.   //#   Boolean operator>=(const MOrderableCollectible& obj) const;
  63.  
  64.   boolean somfIsLessThanOrEqualTo(in somf_MOrderableCollectible obj);
  65.   // Returns TRUE if obj is "less than" or "equal to" this.
  66.   //#   Boolean operator<=(const MOrderableCollectible& obj) const;
  67.  
  68.   //# The following streaming operators are not ported until the TStream
  69.   //# approach is resolved.
  70.   //#   virtual TStream& operator>>=(TStream& towhere) const;
  71.   //#   virtual TStream& operator<<=(TStream& towhere);
  72.   //#   MCollectibleDeclarationsMacro(MOrderableCollectible);
  73.  
  74.   //# protected:
  75.   //#   MOrderableCollectible();
  76.  
  77.  
  78. #ifdef __SOMIDL__
  79.   implementation {
  80.  
  81.  
  82.     releaseorder: somfClone, somfClonePointer,
  83.                   somfHash, somfIsEqual,
  84.                   somfIsSame, somfIsNotEqual,
  85.                   somfIsGreaterThan, somfIsLessThan,
  86.                   somfCompare, somfIsGreaterThanOrEqualTo,
  87.                   somfIsLessThanOrEqualTo;
  88.  
  89.     //# Class Modifiers
  90.     majorversion = 2;
  91.     minorversion = 1;
  92.     filestem     = morder;
  93.     dllname      = "somuc.dll";
  94.     classinit    = MOrderableCollectibleClassInit;
  95.  
  96.  
  97.     passthru C_xh_after =  ""
  98. ""
  99. "#define SOMF_CALL_ORDERABLE_COMPARE_FN(obj,token,parameter) (((somTD_somf_MOrderableCollectible_somfIsLessThan) somResolve(obj,token))(obj, ev, parameter))"
  100. ""
  101. "#define SOMF_CALL_BETTER_ORDERABLE_COMPARE_FN(obj,token,parameter) (((somTD_somf_MOrderableCollectible_somfCompare) somResolve(obj,token))(obj, ev, parameter))"
  102. "";
  103.  
  104.     passthru C_h_after =  ""
  105. ""
  106. "#define SOMF_CALL_ORDERABLE_COMPARE_FN(obj,token,parameter) (((somTD_somf_MOrderableCollectible_somfIsLessThan) somResolve(obj,token))(obj, ev, parameter))"
  107. ""
  108. "#define SOMF_CALL_BETTER_ORDERABLE_COMPARE_FN(obj,token,parameter) (((somTD_somf_MOrderableCollectible_somfCompare) somResolve(obj,token))(obj, ev, parameter))"
  109. "";
  110.  
  111.     //# Method Modifiers
  112.     somfIsGreaterThan: nomodify;
  113.     somfIsLessThan: nomodify;
  114.     somfCompare: nomodify;
  115.     somfIsGreaterThanOrEqualTo: nomodify;
  116.     somfIsLessThanOrEqualTo: nomodify;
  117.  
  118.   };
  119. #endif /* __SOMIDL__ */
  120. };
  121.  
  122.  
  123. #endif  /* MOrder_idl */
  124.