-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathgennode.h
More file actions
70 lines (57 loc) · 1.75 KB
/
gennode.h
File metadata and controls
70 lines (57 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef gennode_h
#define gennode_h
/*
* NIST Utils Class Library
* clutils/gennode.h
* April 1997
* David Sauder
* K. C. Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
/* $Id: gennode.h,v 3.0.1.3 1997/11/05 22:33:47 sauderd DP3.1 $ */
#include <sc_export.h>
#include <iostream>
class GenNodeList;
class MgrNodeList;
class DisplayNodeList;
//////////////////////////////////////////////////////////////////////////////
// GenericNode
// If you delete this object it first removes itself from any list it is in.
//////////////////////////////////////////////////////////////////////////////
class SC_UTILS_EXPORT GenericNode {
friend class GenNodeList;
friend class MgrNodeList;
friend class DisplayNodeList;
protected:
GenericNode * next;
GenericNode * prev;
public:
GenericNode();
virtual ~GenericNode();
GenericNode * Next() {
return next;
}
GenericNode * Prev() {
return prev;
}
virtual void Append( GenNodeList * list );
virtual void Remove() {
( next ) ? ( next->prev = prev ) : 0;
( prev ) ? ( prev->next = next ) : 0;
/*
// if(next)
// next->prev = prev;
// if(prev)
// prev->next = next;
*/
next = 0;
prev = 0;
}
};
//////////////////////////////////////////////////////////////////////////////
// GenericNode inline functions
// these functions don't rely on any inline functions (its own or
// other classes) that aren't in this file
//////////////////////////////////////////////////////////////////////////////
#endif