1 #ifndef LIST_H
2 #define LIST_H
3
4 #include <iostream>
5
6 class list
7 {
8 public:
9 list();
10 ~list();
11
12 list *remove();
13 void append(list *lp);
14 void insert(list *lp);
15 list *get_next() const { return next; }
16 list *get_prev() const { return prev; }
17
18 void print( std::ostream& os) const;
19
20 static int get_nid() { return nid; }
21 private:
22 const int id;
23 list *next;
24 list *prev;
25
26 static int nid;
27
28 // ADA: private limited
29 list( const list &rhs);
30 list operator=( const list *rhs);
31 };
32
33 std::ostream& operator<<( std::ostream&, const list&);
34
35 #endif /* LIST_H */
36
37