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

  1. //
  2. //   COMPONENT_NAME: somp
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13. //#  @(#) 2.10 src/somp/objset.idl, somp, som2.1 1/19/96 16:19:21 [7/30/96 14:46:55]
  14.  
  15.  
  16.  
  17. #ifndef objset_idl
  18. #define objset_idl
  19.  
  20. #include <somp.idl>
  21. #include <somobj.idl>
  22. interface SOMBuf;
  23. interface SOMPPersistentId;
  24.  
  25. interface SOMPObjectSet : SOMObject
  26.  
  27. // This class is an abstact definition for a set of objects
  28. // and the operations which can be performed on the set.
  29.  
  30. {
  31.    SOMObject sompSetGetNth(in unsigned long n);
  32. // Return the nth object from the set.
  33.  
  34.    SOMObject sompFindByID(in SOMPPersistentId lookfor);
  35. // Return the object with the ID given by <lookfor>. The true type of the
  36. // ID passed depends on the objects in the set. (All the objects in the
  37. // set are expected to be of the same type.)
  38.  
  39.    long sompFindByAddress(in SOMObject lookfor);
  40. // Returns the position in the set of the "lookfor" object or
  41. // -1 if the object was not found.
  42.  
  43.    void sompAddToSet(in SOMObject thisObject);
  44. // Add an object to the set.
  45.  
  46.    void sompSetDeleteNth(in unsigned long n);
  47. // Delete the nth object from the set.
  48.  
  49.    long sompGetSetSize();
  50. // Returns the set size.
  51.  
  52.    boolean sompObjEqualsID(in SOMObject cmpObj, in SOMPPersistentId lookfor);
  53. // Returns TRUE if the given object <cmpObj> has the given
  54. // ID <lookfor>. Override this to make the appropriate
  55. // comparison for the objects in the set.
  56.  
  57. #ifdef __SOMIDL__
  58.  
  59. implementation
  60. {
  61.    callstyle = idl;
  62.    dllname="somp.dll";
  63.  
  64.    releaseorder: sompSetGetNth, sompFindByID,
  65.          sompFindByAddress, sompAddToSet,
  66.          sompSetDeleteNth, sompGetSetSize,
  67.          sompObjEqualsID;
  68.  
  69. // Class Modifiers
  70.    majorversion = 2;
  71.    minorversion = 1;
  72.    filestem = objset;
  73.  
  74. // Internal Instance Variables
  75.    SOMBuf storage;
  76.  
  77. // Method Modifiers
  78.    somInit: override;
  79.    somUninit: override;
  80.    somDumpSelfInt: override;
  81.  
  82. };
  83. #endif /* __SOMIDL__ */
  84.  
  85. };
  86.  
  87.  
  88. #endif  /* objset_idl */
  89.