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,36 @@
// $XConsortium: Attribute.cc /main/4 1996/06/11 17:05:20 cde-hal $
#include "Attribute.h"
// /////////////////////////////////////////////////////////////////////////
// Attribute
// /////////////////////////////////////////////////////////////////////////
Attribute::Attribute(const Symbol &name, char *value)
: f_name(name),
f_value(value)
{
}
Attribute::~Attribute()
{
delete f_value ;
}
Attribute::operator==(const Attribute &attr) const
{
/*
cerr << "Attribute::operator==\n";
cerr << f_name << "\n";
cerr << attr.f_name << "\n";
cerr << "<" << f_name.name() << ">\n";
cerr << "<" << attr.f_name.name() << ">\n";
cerr << attr.name().operator==(f_name) << "\n";
*/
return f_name == attr.name();
}
ostream &
Attribute::print(ostream &o) const
{
return o << f_name << '=' << f_value ;
}