NAMD
Set.h
Go to the documentation of this file.
1 
7 #ifndef IRSET_DEFS_H
8 #define IRSET_DEFS_H
9 class InfoRecord;
10 
11 
12 class listNode {
13 public:
16 listNode(InfoRecord *i) : info(i) {;}
17 };
18 
19 class Iterator{
20 public:
21  int id; // for debugging
23 };
24 
25 class IRSet {
26 
27 private:
28  listNode *head;
29  int nElements;
30 
31 public:
32  IRSet();
33  ~IRSet();
35  void insert(InfoRecord *);
36  int find(InfoRecord *) ;
37  int remove(InfoRecord *);
38  void myRemove(listNode **n, InfoRecord *r);
41  int numElements();
42  int hasElements();
43  void print();
44 };
45 
46 class LargeIRSet : public IRSet {
47 private:
48  void insert(InfoRecord *);
49  int find(InfoRecord *);
50 };
51 
52 #endif
IRSet()
Definition: Set.C:17
Definition: Set.h:12
listNode * next
Definition: Set.h:22
int numElements()
Definition: Set.C:144
void insert(InfoRecord *)
Definition: Set.C:49
InfoRecord *const info
Definition: Set.h:15
listNode(InfoRecord *i)
Definition: Set.h:16
InfoRecord * next(Iterator *)
Definition: Set.C:131
Definition: Set.h:25
int hasElements()
Definition: Set.C:149
listNode * next
Definition: Set.h:14
Definition: Set.h:19
Definition: Set.h:46
void unchecked_insert(InfoRecord *)
Definition: Set.C:32
void myRemove(listNode **n, InfoRecord *r)
Definition: Set.C:67
void print()
Definition: Set.C:154
InfoRecord * iterator(Iterator *)
Definition: Set.C:122
int find(InfoRecord *)
Definition: Set.C:112
int id
Definition: Set.h:21
~IRSet()
Definition: Set.C:23