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

  1. //
  2. //   COMPONENT_NAME: somu
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  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.7 src/somu/somsid.idl, somu, som2.1 9/1/94 17:46:57 [7/30/96 14:49:56]
  14.  
  15.  
  16. #ifndef somsid_idl
  17. #define somsid_idl
  18.  
  19. #include <somida.idl>
  20.  
  21. interface SOMUTStringId : SOMUTId
  22.  
  23. // This is the abstract base class for an ASCIIZ string (an ASCII string
  24. // terminated with a zero) based ID. Refer to derived classes for details.
  25. //
  26. // Intances of classes derived from this one should represent a string
  27. // value which can be used to identify something... such as an object,
  28. // a file, a network node, etc, etc...
  29. //
  30.  
  31. {
  32.   long somutSetIdString(in string IdString);
  33.   // Sets the ID to the given string.
  34.   // Returns nonzero error code if given IdString is not syntactically correct.
  35.  
  36.   string somutGetIdString(in string toBuffer);
  37.   // Stores the ID as a string into the given buffer <toBuffer> and
  38.   // returns the buffer <toBuffer>.
  39.   // Use somutGetIdStringLen to determine appropriate <toBuffer> size.
  40.  
  41.   long somutGetIdStringLen();
  42.   // Returns the length of the ID string.
  43.  
  44.   boolean somutEqualsString(in string IdString);
  45.   // Checks to see if this object's ID is equivalent to the given string.
  46.   // Returns TRUE if the ID is equivalent to the string, FALSE otherwise.
  47.  
  48.   short somutCompareString(in string IdString);
  49.   // Performs an ordered comparison with the given string.
  50.   // If this ID < IdString -1 is returned.
  51.   // If this ID = IdString  0 is returned.
  52.   // If this ID > IdString  1 is returned.
  53.  
  54. #ifdef __SOMIDL__
  55.  
  56.   implementation
  57.   {
  58.  
  59.     callstyle = idl;
  60.  
  61.     releaseorder: somutSetIdString, somutGetIdString, somutGetIdStringLen,
  62.                   somutEqualsString, somutCompareString;
  63.  
  64.     majorversion = 2;
  65.     minorversion = 1;
  66.     filestem = somsid;
  67.  
  68.     //# Method Modifiers
  69.     somutSetIdId:   override;
  70.     somutEqualsId:  override;
  71.     somutCompareId: override;
  72.     somutHashId:    override;
  73.  
  74.   };
  75.  
  76. #endif /* __SOMIDL__ */
  77.  
  78. };
  79.  
  80. #endif  /* somsid_idl */
  81.