Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
42
cde/programs/dtinfo/DtMmdb/StyleSheet/AttributeList.C
Normal file
42
cde/programs/dtinfo/DtMmdb/StyleSheet/AttributeList.C
Normal file
@@ -0,0 +1,42 @@
|
||||
// $XConsortium: AttributeList.cc /main/4 1996/06/11 17:05:32 cde-hal $
|
||||
#include "AttributeList.h"
|
||||
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
// AttributeList
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
AttributeList::AttributeList()
|
||||
: CC_TPtrSlist<Attribute> ()
|
||||
{
|
||||
}
|
||||
|
||||
AttributeList::~AttributeList()
|
||||
{
|
||||
clearAndDestroy();
|
||||
}
|
||||
|
||||
const Attribute*
|
||||
AttributeList::lookup(const Symbol &name) const
|
||||
{
|
||||
Attribute attr(name);
|
||||
return find(&attr);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AttributeList::add(Attribute *attr)
|
||||
{
|
||||
append(attr);
|
||||
}
|
||||
|
||||
ostream &
|
||||
AttributeList::print(ostream &o) const
|
||||
{
|
||||
CC_TPtrSlistIterator<Attribute> next(*(CC_TPtrSlist<Attribute>*)this);
|
||||
|
||||
while (++next)
|
||||
o << ' ' << *next.key() ;
|
||||
|
||||
return o;
|
||||
}
|
||||
Reference in New Issue
Block a user