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
/
GENNODE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-07-20
|
2KB
|
70 lines
#ifndef gennode_h
#define gennode_h
/*
* NIST Utils Class Library
* clutils/gennode.h
* 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: gennode.h,v 2.0.1.2 1994/04/05 16:44:01 sauderd Exp $ */
#ifdef __O3DB__
#include <OpenOODB.h>
#endif
#include <iostream.h>
class GenNodeList;
class MgrNodeList;
class DisplayNodeList;
//////////////////////////////////////////////////////////////////////////////
// GenericNode
// If you delete this object it first removes itself from any list it is in.
//////////////////////////////////////////////////////////////////////////////
class GenericNode
{
friend GenNodeList;
friend MgrNodeList;
friend DisplayNodeList;
protected:
GenericNode *next;
GenericNode *prev;
public:
GenericNode() { next = 0; prev = 0; }
virtual ~GenericNode() { Remove(); }
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