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

  1. //#  @(#) 2.12 src/somuc/tssnode.idl, somuc, som2.1 12/26/95 15:42:38 [7/30/96 14:50:12]
  2. //
  3. //   COMPONENT_NAME: somuc
  4. //
  5. //   ORIGINS: 82, 81, 27
  6. //
  7. //
  8. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996  
  9. //   All Rights Reserved
  10. //   Licensed Materials - Property of IBM
  11. //   US Government Users Restricted Rights - Use, duplication or
  12. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  13. //
  14. //   Copyright ⌐ 1988, 1989 Apple Computer, Inc. All rights reserved.
  15.  
  16. /*
  17.  * CLASS_NAME: somf_TSortedSequenceNode
  18.  *
  19.  * DESCRIPTION: A TSortedSequenceNode is a node in a tree containing
  20.  *              MOrderableCollectible elements.  It contains a key
  21.  *              (the MOrderableCollectible) and a link to a left child and
  22.  *              a right child.
  23.  *
  24.  */
  25.  
  26. #ifndef TSSNode_idl
  27. #define TSSNode_idl
  28.  
  29. #include <somobj.idl>
  30. #include <mcollect.idl>
  31.  
  32. interface somf_MOrderableCollectible;
  33.  
  34. interface somf_TSortedSequenceNode : SOMObject
  35. {
  36.  
  37.   //# The following method is overridden below:
  38.   //#   TSortedSequenceNode();
  39.  
  40.   somf_TSortedSequenceNode somfTSortedSequenceNodeInitTMT(in somf_TSortedSequenceNode n1,
  41.                 in somf_MOrderableCollectible obj,
  42.                 in somf_TSortedSequenceNode n2);
  43.   // Initialize the new TSortedSequenceNode
  44.   //#  TSortedSequenceNode(TSortedSequenceNode* n1, MOrderableCollectible* obj=SOMF_NIL, TSortedSequenceNode* n2=SOMF_NIL);
  45.  
  46.   somf_TSortedSequenceNode somfTSortedSequenceNodeInitTM(in somf_TSortedSequenceNode n1,
  47.                 in somf_MOrderableCollectible obj);
  48.   // Initialize the new TSortedSequenceNode
  49.   //#  TSortedSequenceNode(TSortedSequenceNode* n1, MOrderableCollectible* obj=SOMF_NIL, TSortedSequenceNode* n2=SOMF_NIL);
  50.  
  51.   somf_TSortedSequenceNode somfTSortedSequenceNodeInitT(in somf_TSortedSequenceNode n1);
  52.   // Initialize the new TSortedSequenceNode
  53.   //#  TSortedSequenceNode(TSortedSequenceNode* n1, MOrderableCollectible* obj=SOMF_NIL, TSortedSequenceNode* n2=SOMF_NIL);
  54.  
  55.   //# The following method is not ported since it contains no logic:
  56.   //#   virtual ~TSortedSequenceNode();
  57.  
  58.   somf_TSortedSequenceNode somfGetLeftChild();
  59.   // Determine the left child of the node.
  60.   //# TSortedSequenceNode* GetLeftChild();
  61.  
  62.   somf_TSortedSequenceNode somfGetRightChild();
  63.   // Determine the right child of the node.
  64.   //# TSortedSequenceNode* GetRightChild();
  65.  
  66.   somf_TSortedSequenceNode somfGetParent();
  67.   // Determine the parent of the node.
  68.   //# TSortedSequenceNode* GetParent();
  69.  
  70.   somf_MOrderableCollectible somfGetKey();
  71.   // Determine the key to the node.
  72.   //# MOrderableCollectible* GetKey();
  73.  
  74.   boolean somfGetRed();
  75.   // Determine if the node is red or black.
  76.   //# Boolean GetRed();
  77.  
  78.   void somfSetParent(in somf_TSortedSequenceNode n);
  79.   // Set the parent of the node.
  80.   //# void SetParent(TSortedSequenceNode* n);
  81.  
  82.   void somfSetLeftChild(in somf_TSortedSequenceNode n);
  83.   // Set the left child of the node.
  84.   //# void SetLeftChild(TSortedSequenceNode* n);
  85.  
  86.   void somfSetRightChild(in somf_TSortedSequenceNode n);
  87.   // Set the right child of the node.
  88.   //# void SetRightChild(TSortedSequenceNode* n);
  89.  
  90.   void somfSetKey(in somf_MOrderableCollectible k);
  91.   // Set the key to the node.
  92.   //# void SetKey(MOrderableCollectible* k);
  93.  
  94.   void somfSetRed(in boolean on);
  95.   // Set the node to red or black.
  96.   //# void SetRed(Boolean on=TRUE);
  97.  
  98.   void somfSetRedOn();
  99.   // Set the node to red.
  100.   //# void SetRed(Boolean on=TRUE);
  101.  
  102.  
  103.  
  104. #ifdef __SOMIDL__
  105.   implementation {
  106.  
  107.     releaseorder: somfGetLeftChild, somfGetRightChild, somfGetParent,
  108.           somfGetKey, somfGetRed, somfSetParent, somfSetLeftChild,
  109.           somfSetRightChild, somfSetKey, somfSetRed, somfSetRedOn,
  110.           somfTSortedSequenceNodeInitTMT, somfTSortedSequenceNodeInitTM,
  111.           somfTSortedSequenceNodeInitT;
  112.  
  113.     //# Class Modifiers
  114.     majorversion = 2;
  115.     minorversion = 1;
  116.     filestem = tssnode;
  117.     dllname = "somuc.dll";
  118.  
  119.  
  120.     passthru C_xh_after =  ""
  121. "#include <morder.xh>";
  122.  
  123.     passthru C_h_after =  ""
  124. "#include <morder.h>";
  125.  
  126.     //# Internal Instance Variables
  127.     somf_TSortedSequenceNode          fLeftChild;
  128.     somf_MOrderableCollectible        fKey;
  129.     somf_TSortedSequenceNode          fRightChild;
  130.     somf_TSortedSequenceNode          fParent;
  131.     boolean                         fRed;
  132.  
  133.     //# Method Modifiers
  134.     somInit: override;
  135.     somfTSortedSequenceNodeInitTMT : nooverride;
  136.     somfTSortedSequenceNodeInitTM : nooverride;
  137.     somfTSortedSequenceNodeInitT : nooverride;
  138.     somfGetLeftChild : nooverride;
  139.     somfGetRightChild : nooverride;
  140.     somfGetParent : nooverride;
  141.     somfGetKey : nooverride;
  142.     somfGetRed : nooverride;
  143.     somfSetParent : nooverride;
  144.     somfSetLeftChild : nooverride;
  145.     somfSetRightChild : nooverride;
  146.     somfSetKey : nooverride;
  147.     somfSetRed : nooverride;
  148.  
  149.     //# Data Modifiers
  150.  
  151.   };
  152. #endif /* __SOMIDL__ */
  153. };
  154.  
  155. #endif  /* TSSNode_idl */
  156.