Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View 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;
}