Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
44
cde/programs/dtinfo/dtinfogen/infolib/etc/ExprList.C
Normal file
44
cde/programs/dtinfo/dtinfogen/infolib/etc/ExprList.C
Normal file
@@ -0,0 +1,44 @@
|
||||
/* $XConsortium: ExprList.C /main/3 1996/08/21 15:46:33 drk $ */
|
||||
/* imported interfaces */
|
||||
|
||||
/* exported interfaces */
|
||||
#include "Expression.h"
|
||||
#include "ExprList.h"
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ExprList::ExprList()
|
||||
{
|
||||
head = 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ExprList::ExprList( OL_Expression *elist )
|
||||
{
|
||||
head = elist;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ExprList::~ExprList()
|
||||
{
|
||||
OL_Expression *ptr = head;
|
||||
while ( ptr ) {
|
||||
OL_Expression *tmp = ptr;
|
||||
ptr = ptr->next;
|
||||
delete tmp;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OL_Expression *
|
||||
ExprList::first()
|
||||
{
|
||||
return ( head );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OL_Expression *
|
||||
ExprList::next( OL_Expression *ptr )
|
||||
{
|
||||
if ( ptr ) { return(ptr->next); }
|
||||
else { return 0; }
|
||||
}
|
||||
Reference in New Issue
Block a user