Listing 3 (listclas.h)

//////////////////////////////////////////////////////
// D_List Class - Similar to list class
// developed for CUJ July, 1990
//
// Dave's List.
//
//////////////////////////////////////////////////////
#ifndef LISTCLAS_H
#define LISTCLAS_H
#include <stdio.h>
enum Boolean {false, true};

class D_List {
   public:
      virtual Boolean at_top()
      { return ((Boolean) (tell() == 0L));}
   virtual Boolean at_end0 : 0;
      virtual Boolean is_empty()
      { return ((Boolean) (total() == 0L)); }
   virtual Boolean find(void *key) = 0;
   virtual void prev() = 0,
      next() = 0,
      seek(long where, int start),
      top() = 0,
      end() = 0,
      add() = 0,
      replace(void *member) = 0,
      remove() = 0;
   virtual void *current() = 0;
      long virtual  total(),
                  tell() = 0;
      void * operator[] (long where)
      { seek(where,SEEK_SET); return current(); }
      void * operator[] (void *key)
      { return (find(key) ? current() : NULL); }
};
#endif

/* End of File */