home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / c / samples / tp / link.cs_ / link.csc
Encoding:
Text File  |  1993-03-12  |  1.4 KB  |  68 lines

  1. #   @(#)link.csc 1.3 1/22/92 16:10:11 [1/26/92] (c)IBM Corp. 1992
  2.  
  3. -- This class is adapted from the book
  4. --   Class Construction in C and C++, Object Oriented Fundamentals
  5. --   by Roger Sessions, Copyright (c) 1992 Prentice Hall.
  6. -- Reprinted with permission.
  7.  
  8. include <bt.sc>
  9.  
  10. class: link,
  11.   local;
  12.  
  13. parent: baseType;
  14.  
  15. /*
  16. ----------------------------------------------------
  17.   Class: link
  18.  
  19. Purpose: A low-level class used to implement the
  20.      linkedList class.
  21. ---------------------------------------------------- */
  22.  
  23. passthru: C.h;
  24. #include "bt.h"
  25. endpassthru;
  26.  
  27. data:
  28.  
  29.   link *next;
  30.   link *previous;
  31.   baseType *contents;
  32.  
  33. methods:
  34.  
  35. group: SetMethods;
  36.  
  37.   void linkSetNext(link *nextLink);
  38.   -- Set the next pointer on target link to new link.
  39.  
  40.   void linkSetPrevious(link *nextLink);
  41.   -- Set the previous pointer on target link to new link.
  42.  
  43.   void linkSetContents(baseType *newContents);
  44.   -- Set the contents pointer on target link to new object.
  45.  
  46. group: GetMethods;
  47.  
  48.   link *linkGetNext();
  49.   -- Get the next link after the target link.
  50.  
  51.   link *linkGetPrevious();
  52.   -- Get the previous link before the target link.
  53.  
  54.   baseType *linkGetContents();
  55.   -- Get the contents of the target link.
  56.  
  57. group: ParentOverrides;
  58.  
  59.   override print;
  60.   -- See the baseType definition for more information.
  61.  
  62. group: SystemMethodOverrides;
  63.  
  64.    override somInit;
  65.  
  66.    override somDumpSelfInt;
  67.  
  68.