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

  1. //#  @(#) 2.12 src/somuc/tseq.idl, somuc, som2.1 12/26/95 15:40:34 [7/30/96 14:50:09]
  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_TSequence
  18.  *
  19.  * DESCRIPTION: TSequence is an abstract superclass for collections whose
  20.  *              elements are ordered.
  21.  *
  22.  */
  23.  
  24. #ifndef TSeq_idl
  25. #define TSeq_idl
  26.  
  27. #include <tcollect.idl>
  28.  
  29. /* interface somf_MCollectible; */
  30.  
  31. interface somf_TSequence : somf_TCollection
  32. {
  33.   somf_MCollectible somfAfter(in somf_MCollectible obj);
  34.   // Return the object found after obj.
  35.   //# virtual MCollectible* After(const MCollectible& obj) const = 0;
  36.  
  37.  
  38.   somf_MCollectible somfBefore(in somf_MCollectible obj);
  39.   // Return the object found before obj.
  40.   //# virtual MCollectible* Before(const MCollectible& obj) const = 0;
  41.  
  42.  
  43.   somf_MCollectible somfLast();
  44.   // Determine the last object in this.
  45.   //# virtual MCollectible* Last() const = 0;
  46.  
  47.  
  48.   somf_MCollectible somfFirst();
  49.   // Determine the first object in this.
  50.   //# virtual MCollectible* First() const = 0;
  51.  
  52.  
  53.   long somfOccurrencesOf(in somf_MCollectible obj);
  54.   // Determine the number of times obj is in this.
  55.   //# virtual long OccurrencesOf(const MCollectible& obj) const;
  56.  
  57.  
  58.   //# The following methods are overridden below:
  59.   //# virtual MCollectible* Add(MCollectible* obj) = 0;
  60.   //# virtual MCollectible* Remove(const MCollectible& obj) = 0;
  61.   //# virtual void RemoveAll() = 0;
  62.   //# virtual void DeleteAll() = 0;
  63.   //# virtual long Count() const = 0;
  64.   //# virtual TIterator* CreateIterator() const = 0;
  65.  
  66.   //# The following operators are not ported until Streaming is ported.
  67.   //# virtual TStream& operator>>=(TStream& towhere) const;
  68.   //# virtual TStream& operator<<=(TStream& towhere);
  69.  
  70.   somf_TSequence somfTSequenceInit(in somf_MCollectible::somf_MCollectibleCompareFn testfn);
  71.   // This method initializes a new TSequence.
  72.   //# protected:
  73.   //#   TSequence(MCollectibleCompareFn testfn = &MCollectible::IsSame);
  74.  
  75.  
  76.  
  77. #ifdef __SOMIDL__
  78.   implementation {
  79.  
  80.     releaseorder: somfFirst,somfAfter,somfBefore,somfLast,
  81.           somfOccurrencesOf,somfTSequenceInit;
  82.  
  83.  
  84.     //# Class Modifiers
  85.     majorversion = 2;
  86.     minorversion = 1;
  87.     filestem = tseq;
  88.     dllname = "somuc.dll";
  89.  
  90.     passthru C_xh =     ""
  91. "#include <mcollect.xh>";
  92.  
  93.     passthru C_h =      ""
  94. "#include <mcollect.h>";
  95.  
  96.  
  97.     //# Method Modifiers
  98.     somfAfter: nomodify;
  99.     somfBefore: nomodify;
  100.     somfLast: nomodify;
  101.     somfFirst: nomodify;
  102.     somfOccurrencesOf: nomodify;
  103.     somfAdd: override;
  104.     somfRemove: override;
  105.     somfRemoveAll: override;
  106.     somfDeleteAll: override;
  107.     somfCount: override;
  108.     somfCreateIterator: override;
  109.     somInit: override;
  110.     somfTSequenceInit: nooverride;
  111.  
  112.   };
  113. #endif /* __SOMIDL__ */
  114. };
  115.  
  116. #endif  /* TSeq_idl */
  117.