home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / compiler / authors / authors1 / datntree.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-20  |  2.7 KB  |  54 lines

  1. //+----------------------------------------------------------------------------+
  2. //| DATNTREE.HPP                                                               |
  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. //| Purpose     : This class encapsulates the links to the immediate neighbours|
  23. //|               in the n-ary tree.                                           |
  24. //| Author      : njC Sales                                                    |
  25. //| Date        : 27 October 1992                                              |
  26. //+----------------------------------------------------------------------------+
  27.  
  28. #ifndef DATNTREE_HPP_INCLUDED
  29. #define DATNTREE_HPP_INCLUDED
  30.  
  31. #include "treenode.hpp"
  32. #include "treedata.hpp"
  33.  
  34. class DataInTree : public TreeNode
  35. {
  36. public:
  37.    DataInTree(): TreeNode(), MyData() {}
  38.    DataInTree(void *pString);
  39.    DataInTree(DataInTree *pDataInTree);
  40.    DataInTree(const DataInTree &rDataInTree);
  41.  
  42.    virtual ~DataInTree() {}
  43.  
  44.    DataInTree &operator= (const DataInTree &rDataInTree);
  45.  
  46.    virtual void display();
  47.    virtual void SetData(void *pString) { MyData.setData(pString); }
  48.    virtual void *GetData() const       { return MyData.getData(); }
  49.  
  50. protected:
  51.    TreeData   MyData;
  52. };
  53. #endif
  54.