|
From: Frank V. C. <fr...@us...> - 2001-03-31 14:05:04
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1
In directory usw-pr-cvs1:/tmp/cvs-serv21774/src/testdrivers/exf1
Modified Files:
examp1.cpp
Log Message:
Added attributes and re-orged Concept->Schema
Index: examp1.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** examp1.cpp 2001/03/01 16:34:28 1.31
--- examp1.cpp 2001/03/31 14:05:00 1.32
***************
*** 91,94 ****
--- 91,98 ----
#endif
+ #if !defined(__ATTRIBUTE_HPP)
+ #include <clfw/Attribute.hpp>
+ #endif
+
#if !defined(__METACLASS_HPP)
#include <clfw/MetaClass.hpp>
***************
*** 121,124 ****
--- 125,130 ----
void dumpMetaTypeInformation( MetaTypePtr );
void dumpTypeInformation( FrameworkEntityPtr );
+ void testAttributes( void );
+ void dumpAttribute( AttributePtr );
void testDispatch( void );
***************
*** 331,334 ****
--- 337,342 ----
aType->setOid( aId );
+ testAttributes();
+
dumpTypeInformation( aType );
***************
*** 638,641 ****
--- 646,683 ----
dumpInstanceFunctions<MetaType>( aMTPtr );
+ }
+
+ void testAttributes( void )
+ {
+ AttributePtr a1 = Attribute::create();
+ AttributePtr a2 = Attribute::create();
+ UnsignedShortIntegerPtr aV1( new UnsignedShortInteger(8) );
+ UnsignedShortIntegerPtr aV2( new UnsignedShortInteger(9) );
+
+ a1->setName("a1");
+ a1->setValue( aV1 );
+
+ a2->setName("a2");
+ a2->setValue(aV2);
+
+ cout << endl;
+ cout << "Compare att 1 = " << (a1->equals(a2) ? "true" : "false" ) << endl;
+
+ a1->setName(a2->getName());
+ cout << "Compare att 2 = " << (a1->equals(a2) ? "true" : "false" ) << endl;
+
+ a1->setValue(a2->getValue());
+ cout << "Compare att 3 = " << (a1->equals(a2) ? "true" : "false" ) << endl;
+
+ Attribute::destroy( a1 );
+ Attribute::destroy( a2 );
+ delete aV1;
+ delete aV2;
+
+ }
+
+ void dumpAttribute( AttributePtr anAttr )
+ {
+ dumpTypeInformation( anAttr->getValue() );
}
//
|