Category : Files from Magazines
Archive   : CUJ9201.ZIP
Filename : 1001024A

 
Output of file : 1001024A contained in archive : CUJ9201.ZIP

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

class D_List {
public:
virtual Boolean at_top()
{ return ((Boolean) (tell() == 0L));}
virtual Boolean at_end() = 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