home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftptest.leeds.ac.uk
/
2015.02.ftptest.leeds.ac.uk.tar
/
ftptest.leeds.ac.uk
/
bionet
/
CAE-GROUP
/
SCL-WIN3x
/
SCL.EXE
/
GENNODEL.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-05
|
1KB
|
66 lines
/*
* NIST Utils Class Library
* clutils/gennodelist.cc
* February, 1994
* David Sauder
* K. C. Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
/* $Id: gennodelist.cc,v 2.0.1.2 1994/04/05 16:44:47 sauderd Exp $ */
#include <gennode.h>
#include <gennodelist.h>
#include <gennodeinline.h>
#include <gennodearray.h>
void
GenNodeList::Remove(GenericNode *node)
{
if(node != head){
node->next->prev = node->prev;
node->prev->next = node->next;
node->next = 0;
node->prev = 0;
}
};
void GenNodeList::ClearEntries()
{
// if(debug_level >= PrintFunctionTrace)
// cout << "GenNodeList::ClearEntries()\n";
GenericNode *gnPrev = head->Next();
GenericNode *gn = gnPrev->Next();
while(gnPrev != head)
{
gnPrev->prev = 0;
gnPrev->next = 0;
gnPrev = gn;
gn = gn->Next();
}
head->next = head;
head->prev = head;
}
void GenNodeList::DeleteEntries()
{
// if(debug_level >= PrintFunctionTrace)
// cout << "GenNodeList::DeleteEntries()\n";
GenericNode *gnPrev = head->Next();
GenericNode *gn;
head->next = 0;
while(gnPrev != head)
{
gn = gnPrev->Next();
delete gnPrev;
gnPrev = gn;
}
head->next = head;
head->prev = head;
}