home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / SAMPLES / COMPILER / SAMPLE06 / TREELINK.CPP < prev    next >
Text File  |  1993-04-03  |  3KB  |  42 lines

  1. //+----------------------------------------------------------------------------+
  2. //| TREELINK.CPP                                                               |
  3. //|                                                                            |
  4. //| COPYRIGHT:                                                                 |
  5. //| ----------                                                                 |
  6. //|  Copyright (C) International Business Machines Corp., 1992,1993.           |
  7. //|                                                                            |
  8. //| DISCLAIMER OF WARRANTIES:                                                  |
  9. //| -------------------------                                                  |
  10. //|  The following [enclosed] code is sample code created by IBM Corporation.  |
  11. //|  This sample code is not part of any standard IBM product and is provided  |
  12. //|  to you solely for the purpose of assisting you in the development of      |
  13. //|  your applications.  The code is provided "AS IS", without warranty of     |
  14. //|  any kind.  IBM shall not be liable for any damages arising out of your    |
  15. //|  use of the sample code, even if they have been advised of the             |
  16. //|  possibility of such damages.                                              |
  17. //|                                                                            |
  18. //| REVISION LEVEL: 1.0                                                        |
  19. //| ---------------                                                            |
  20. //|                                                                            |
  21. //+----------------------------------------------------------------------------+
  22. //| Class Name  : TREELINK                                                     |
  23. //| Purpose     : This class encapsulates the links to the immediate neighbours|
  24. //|               in the n-ary tree.                                           |
  25. //| Author      : njC Sales                                                    |
  26. //| Date        : 27 October 1992                                              |
  27. //+----------------------------------------------------------------------------+
  28.  
  29. #include "treelink.hpp"
  30.  
  31. TreeLink &TreeLink::operator= (const TreeLink &tLink)
  32. {
  33.    if (this != &tLink)
  34.    {
  35.       parentLink= tLink.parentLink;
  36.       childLink=  tLink.childLink;
  37.       leftLink=   tLink.leftLink;
  38.       rightLink=  tLink.rightLink;
  39.    }
  40.    return *this;
  41. }
  42.