home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / SCL.EXE / LIST.H < prev    next >
C/C++ Source or Header  |  1994-08-06  |  1KB  |  60 lines

  1. #ifndef list_h
  2. #define    list_h
  3.  
  4. /*
  5. * NIST STEP Core Class Library
  6. * clstepcore/SingleLinkList.h
  7. * February, 1994
  8. * David Sauder
  9. * KC Morris
  10.  
  11. * Development of this software was funded by the United States Government,
  12. * and is not subject to copyright.
  13. */
  14.  
  15. /* $Id: SingleLinkList.h,v 2.0.1.1 1994/04/05 16:36:31 sauderd Exp $ */
  16.  
  17.  
  18.  
  19. class SingleLinkList  {
  20.  
  21.     // node which represents the value is contained in the subclass
  22.     //  since it may have different types for different lists
  23.     
  24.   protected:
  25.     
  26.     class  SingleLinkNode *  head;
  27.     SingleLinkNode *  tail;
  28.  
  29.   public:
  30.     
  31.     virtual SingleLinkNode *NewNode();
  32.     virtual void AppendNode (SingleLinkNode *);
  33.  
  34.     virtual void Empty ();
  35.     virtual SingleLinkNode * GetHead () const;
  36.     
  37.     int EntryCount() const;
  38.  
  39.     SingleLinkList ();
  40.     virtual ~SingleLinkList ();
  41.     
  42. }
  43. ;
  44.  
  45.  
  46. class SingleLinkNode {
  47.     friend SingleLinkList;    
  48.   protected:
  49.  
  50.   public:
  51.     SingleLinkNode* next;
  52.  
  53.   public:
  54.     virtual SingleLinkNode *NextNode () const;
  55.     SingleLinkNode()  { next =0; }
  56.     virtual ~SingleLinkNode() { }
  57. };
  58.  
  59. #endif
  60.