source: liacs/da/opdr1/list.h@ 92

Last change on this file since 92 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

File size: 507 bytes
Line 
1#ifndef ListH
2#define ListH
3
4struct dlink {
5 dlink *next;
6 dlink *prev;
7 int info;
8 dlink(int i) {next = prev = 0; info = i;}
9};
10
11class List {
12public:
13 List(); // Constructor
14 ~List(); // Destructor
15 int Get();
16 void Change(int item);
17 void Insert(int item);
18 void Append(int item);
19 void Delete();
20 bool IsEmpty();
21 bool IsBegin();
22 bool IsEnd();
23 void GoToBegin();
24 void GoToEnd();
25 void GoToPrevious();
26 void GoToNext();
27private:
28 dlink *head;
29 dlink *tail;
30 dlink *curr;
31};
32
33#endif
Note: See TracBrowser for help on using the repository browser.