forked from stepcode/stepcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdispnodelist.cc
More file actions
55 lines (45 loc) · 1.7 KB
/
dispnodelist.cc
File metadata and controls
55 lines (45 loc) · 1.7 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
/*
* NIST STEP Editor Class Library
* cleditor/dispnodelist.cc
* 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: dispnodelist.cc,v 3.0.1.2 1997/11/05 22:11:40 sauderd DP3.1 $ */
#include "clutils/gennode.h"
#include "clutils/gennodelist.h"
#include "clstepcore/mgrnode.h"
#include "clstepcore/mgrnodelist.h"
#include "clstepcore/dispnode.h"
#include "clstepcore/dispnodelist.h"
void DisplayNodeList::Remove( GenericNode * node ) {
GenNodeList::Remove( node );
// DON'T DO THIS ((DisplayNode *)node)->displayState = noMapState;
}
// deletes node from its previous list & appends
// actually it puts it at the front of the list.
void DisplayNodeList::Append( GenericNode * node ) {
InsertBefore( node, head );
}
// deletes newNode from its previous list & inserts after
// existNode
void DisplayNodeList::InsertAfter( GenericNode * newNode,
GenericNode * existNode ) {
if( newNode->next != 0 ) { // remove the node from its previous
newNode->Remove(); // display state list
}
GenNodeList::InsertAfter( newNode, existNode );
// DON'T DO THIS ((DisplayNode *)newNode)->displayState = listType;
}
// deletes newNode from its previous list & inserts before
// existNode
void DisplayNodeList::InsertBefore( GenericNode * newNode,
GenericNode * existNode ) {
if( newNode->next != 0 ) { // remove the node from its previous
newNode->Remove(); // display state list
}
GenNodeList::InsertBefore( newNode, existNode );
// DON'T DO THIS!!! ((DisplayNode *)newNode)->displayState = listType;
}