home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / rehack / contain / linklist.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-21  |  1.2 KB  |  37 lines

  1. #ifndef __LINKLIST_H
  2. #define __LINKLIST_H
  3.  
  4. // ╔════════════════════════════════════════════════╗
  5. // ║ Linklist.h, linklist.cpp                       ║
  6. // ╟────────────────────────────────────────────────╢
  7. // ║ Linked list                                    ║
  8. // ╟────────────────────────────────────────────────╢
  9. // ║ Written by Gus Smedstad                        ║
  10. // ╟────────────────────────────────────────────────╢
  11. // ║ Copyright 1990-91 NoGate Consulting            ║
  12. // ╚════════════════════════════════════════════════╝
  13.  
  14. #ifndef __ABSLIST_H
  15. #include "abslist.h"
  16. #endif
  17.  
  18. class linked_list : public abstract_list {
  19.   friend link_index;
  20. public:
  21.   virtual void         put(containable *arg);
  22.           containable *remove(containable *arg);
  23.  };
  24.  
  25. class link_index : public abstract_index {
  26.   friend linked_list;
  27.   void put(link_node *arg) { abstract_index::put(arg); };
  28. public:
  29.   link_index(linked_list& base) : abstract_index(base) {};
  30.   void         put(containable *arg); // put arg after current item.  If
  31.                                       // current item is NULL, put at start.
  32.   virtual void destroy();
  33.   virtual void operator -- ( int );
  34.  };
  35.  
  36. #endif
  37.