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
/
ATT_LIST.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-06
|
1KB
|
75 lines
/*
* NIST STEP Core Class Library
* clstepcore/STEPattributeList.cc
* February, 1994
* K. C. Morris
* David Sauder
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
/* $Id: STEPattributeList.cc,v 2.0.1.1 1994/04/05 16:39:35 sauderd Exp $ */
#include <att_List.h>
#include <attribut.h>
#include <stdlib.h>
STEPattribute& STEPattributeList::operator [] (int n)
{
int x = 0;
STEPattribute dummy;
AttrListNode* a = (AttrListNode *)head;
if(n < EntryCount())
while (a && (x < n))
{
a = (AttrListNode *)(a->next);
x++;
}
if (a) return *(a->attr);
else
return dummy;
cerr << "\nERROR in STEP Core library: " << __FILE__ << ":"
<< __LINE__ << "\n" << _POC_ << "\n\n";
}
int STEPattributeList::list_length()
{
return EntryCount();
}
void STEPattributeList::push(STEPattribute *a)
{
AttrListNode *saln = new AttrListNode(a);
AppendNode(saln);
}
/*
STEPattributeListNode NilSTEPattributeListNode;
class init_NilSTEPattributeListNode
{
public:
inline init_NilSTEPattributeListNode()
{
NilSTEPattributeListNode.tl = &NilSTEPattributeListNode;
NilSTEPattributeListNode.ref = -1;
}
};
static init_NilSTEPattributeListNode NilSTEPattributeListNode_initializer;
*/