Last change
on this file since 149 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
|
Rev | Line | |
---|
[2] | 1 | #ifndef ListH
|
---|
| 2 | #define ListH
|
---|
| 3 |
|
---|
| 4 | struct dlink {
|
---|
| 5 | dlink *next;
|
---|
| 6 | dlink *prev;
|
---|
| 7 | int info;
|
---|
| 8 | dlink(int i) {next = prev = 0; info = i;}
|
---|
| 9 | };
|
---|
| 10 |
|
---|
| 11 | class List {
|
---|
| 12 | public:
|
---|
| 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();
|
---|
| 27 | private:
|
---|
| 28 | dlink *head;
|
---|
| 29 | dlink *tail;
|
---|
| 30 | dlink *curr;
|
---|
| 31 | };
|
---|
| 32 |
|
---|
| 33 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.