home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / isetbst.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  6.0 KB  |  253 lines

  1. /**********************************************************************
  2. *                                                                     *
  3. *  IBM(R) VisualAge(TM) for C++ for Windows(R), Version 3.5           *
  4. *                                                                     *
  5. *  PID: 5622-880                                                      *
  6. *  - Licensed Material - Program-Property of IBM                      *
  7. *  (C) Copyright IBM Corp. 1991, 1995 - All Right Reserved.           *
  8. *                                                                     *
  9. *  US Government Users Restricted Rights - Use, duplication or        *
  10. *  disclosure restricted by GSA ADP Schedule Contract with IBM Corp.  *
  11. *                                                                     *
  12. *  VisualAge, and IBM are trademarks or registered trademarks of      *
  13. *  International Business Machines Corporation.                       *
  14. *  Windows is a registered trademark of Microsoft Corporation.        *
  15. *                                                                     *
  16. **********************************************************************/
  17.  
  18. #ifndef _ISETBST_H
  19. #define _ISETBST_H
  20.  
  21. #include <iaset.h>
  22. #include <iicset.h>
  23. #include <iivset.h>
  24. #include <iisetbst.h>
  25.  
  26.  
  27. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  28. #pragma pack (4)
  29.  
  30. #pragma SOMAsDefault (off)
  31.  
  32. template <class Element, class ElementOps>
  33. class IGSetAsBstTree;
  34.  
  35. template <class Element, class ElementOps>
  36. class IGSetAsBstTreeCursor :
  37.   public IElementCursor <Element> {
  38.  
  39.   typedef  IElementCursor <Element> Inherited;
  40.  
  41.   typedef  IGSetAsBstTree
  42.             <Element, ElementOps>::
  43.               Implementation::Cursor Implementation;
  44.  
  45. public:
  46.  
  47.            IGSetAsBstTreeCursor
  48.                             (IGSetAsBstTree
  49.                               <
  50.                                Element, ElementOps> const&);
  51.  
  52.   IGSetAsBstTreeCursor <Element, ElementOps>&
  53.            operator=        (IGSetAsBstTreeCursor
  54.                               <
  55.                                Element, ElementOps> const&);
  56.  
  57. protected:
  58.  
  59.            IGSetAsBstTreeCursor
  60.                             (ICursorImpl*);
  61.  
  62. private:
  63.  
  64.  
  65. };
  66.  
  67. template <class Element, class ElementOps>
  68. class IGSetAsBstTree :
  69.   public IASet <Element> {
  70. protected:
  71.  
  72.   typedef  IGSetAsBstTree <Element, ElementOps> Self;
  73.  
  74.   typedef  ISetAsBstTreeImpl PureImplementation;
  75.  
  76. #if defined (INO_CHECKS)
  77.   typedef  PureImplementation Implementation;
  78. #else
  79.   typedef  ICSetImpl
  80.             <PureImplementation> Implementation;
  81. #endif
  82.  
  83. #define IGSetAsBstTreeTypedef(Element, ElementOps)\
  84.   typedef  ISetAsBstTreeOps\
  85.             <Element,\
  86.              IWCOps <Element, ElementOps>,\
  87.              Implementation> Instantiation
  88.  
  89.            IGSetAsBstTreeTypedef (Element, ElementOps);
  90.  
  91. public:
  92.  
  93.   typedef  IGSetAsBstTreeCursor
  94.             <Element, ElementOps> Cursor;
  95.  
  96.  
  97.            IGSetAsBstTree
  98.                             (INumber = 100);
  99.  
  100.            IGSetAsBstTree
  101.                             (IGSetAsBstTree
  102.                               <
  103.                                Element, ElementOps> const&);
  104.  
  105.   IGSetAsBstTree <Element, ElementOps>&
  106.            operator=        (IGSetAsBstTree
  107.                               <
  108.                                Element, ElementOps> const&);
  109.  
  110.  
  111. protected:
  112.  
  113.            IGSetAsBstTree
  114.                             (PureImplementation&);
  115.  
  116.   static
  117.   Implementation&
  118.            ImplOf           (IGSetAsBstTree
  119.                               <
  120.                                Element, ElementOps> const&);
  121.  
  122. private:
  123.  
  124.   friend
  125.   class    IGSetAsBstTreeCursor
  126.             <Element, ElementOps>;
  127.  
  128.  
  129.  
  130. };
  131.  
  132. template <class Element>
  133. class ISetAsBstTree :
  134.   public IGSetAsBstTree
  135.           <Element, ICOps <Element> > {
  136.  
  137.   typedef  IGSetAsBstTree
  138.             <Element,
  139.              ICOps <Element> > Inherited;
  140.  
  141. protected:
  142.  
  143.   typedef  ISetAsBstTree <Element> Self;
  144.  
  145. #define ISetAsBstTreeTypedef(Element)\
  146.   typedef  ISetAsBstTreeOps\
  147.             <Element,\
  148.              IWCOps <Element, ICOps <Element> >,\
  149.              Implementation> Instantiation
  150.  
  151. public:
  152.  
  153.            ISetAsBstTree
  154.                             (INumber = 100);
  155.  
  156.  
  157. protected:
  158.  
  159.            ISetAsBstTree
  160.                               (PureImplementation&);
  161.  
  162. private:
  163.  
  164.  
  165. };
  166.  
  167. template <class Element, class ElementOps>
  168. class IVGSetAsBstTree :
  169.   public IGSetAsBstTree
  170.           <Element, ElementOps > {
  171.  
  172.   typedef  IVGSetAsBstTree
  173.             <Element, ElementOps> Inherited;
  174.  
  175. protected:
  176.  
  177. #if defined (INO_CHECKS)
  178.   typedef  IVSetImpl
  179.             <PureImplementation> Implementation;
  180. #else
  181.   typedef  ICSetImpl
  182.             <IVSetImpl
  183.               <PureImplementation> > Implementation;
  184. #endif
  185.  
  186. #define IVGSetAsBstTreeTypedef(Element, ElementOps)\
  187.   typedef  ISetAsBstTreeOps\
  188.             <Element,\
  189.              IWCOps <Element, ElementOps>,\
  190.              Implementation> Instantiation
  191.  
  192.            IVGSetAsBstTreeTypedef (Element, ElementOps);
  193.  
  194. public:
  195.  
  196.            IVGSetAsBstTree
  197.                             (INumber = 100);
  198.  
  199.  
  200. protected:
  201.  
  202.            IVGSetAsBstTree
  203.                               (PureImplementation&);
  204.  
  205. private:
  206.  
  207.  
  208. };
  209.  
  210. template <class Element>
  211. class IVSetAsBstTree :
  212.   public IVGSetAsBstTree
  213.           <Element, ICOps <Element> > {
  214.  
  215.   typedef  IVGSetAsBstTree
  216.             <Element,
  217.              ICOps <Element> > Inherited;
  218.  
  219. protected:
  220.  
  221.   typedef  IVSetAsBstTree <Element> Self;
  222.  
  223. #define IVSetAsBstTreeTypedef(Element)\
  224.   typedef  IVSetAsBstTreeOps\
  225.             <Element,\
  226.              IWCOps <Element, ICOps <Element> >,\
  227.              Implementation> Instantiation
  228.  
  229. public:
  230.  
  231.            IVSetAsBstTree
  232.                             (INumber = 100);
  233.  
  234.  
  235. protected:
  236.  
  237.            IVSetAsBstTree
  238.                               (PureImplementation&);
  239.  
  240. private:
  241.  
  242.  
  243. };
  244.  
  245. #pragma SOMAsDefault (pop)
  246.  
  247. #include <isetbst.inl>
  248.  
  249. #pragma info (restore)
  250. #pragma pack ()
  251.  
  252. #endif
  253.