|
From: Frank V. C. <fr...@us...> - 2001-04-03 03:00:19
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1
In directory usw-pr-cvs1:/tmp/cvs-serv13149/src/testdrivers/exf1
Modified Files:
examp1.cpp
Log Message:
115287 Enhanced concept type ready for serious testing
Index: examp1.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** examp1.cpp 2001/03/31 22:21:45 1.33
--- examp1.cpp 2001/04/03 03:00:14 1.34
***************
*** 95,102 ****
#endif
- #if !defined(__ATTRIBUTE_HPP)
- #include <clfw/Attribute.hpp>
- #endif
-
#if !defined(__METACLASS_HPP)
#include <clfw/MetaClass.hpp>
--- 95,98 ----
***************
*** 129,134 ****
void dumpMetaTypeInformation( MetaTypePtr );
void dumpTypeInformation( FrameworkEntityPtr );
- void testAttributes( void );
- void dumpAttribute( AttributePtr );
void testDispatch( void );
--- 125,128 ----
***************
*** 341,417 ****
aType->setOid( aId );
- testAttributes();
-
dumpTypeInformation( aType );
- UnsignedInteger ui1( 1 );
- UnsignedInteger ui2( 2 );
- UnsignedInteger ui3( 3 );
- UnsignedInteger ui4( 4 );
- UnsignedInteger ui5( 5 );
- UnsignedInteger ui6( 6 );
- UnsignedInteger ui7( 7 );
-
- SetCollection aSet1;
- SetCollection aSet2;
- Array aRay;
-
- aSet1 += &ui1;
- aSet1 += &ui2;
- aSet1 += &ui3;
-
- aSet2 += &ui4;
- aSet2 += &ui5;
- aSet2 += &ui6;
-
- aRay += &ui1;
- aRay += &ui5;
- aRay += &ui7;
- aRay += &ui7;
-
- cout << endl << "Sets display" << endl;
-
- Count maxCnt = aSet1.getSize();
-
- for( Count x = 0; x < maxCnt; ++x )
- {
- UnsignedInteger *anInt = UnsignedInteger::castDown( aSet1.getElementAt( x ) );
- cout << "Set1:Element at [" << x << "] = " << anInt->getValue() << endl;
- }
-
- maxCnt = aSet2.getSize();
-
- cout << endl ;
-
- for( Count x = 0; x < maxCnt; ++x )
- {
- UnsignedInteger *anInt = UnsignedInteger::castDown( aSet2.getElementAt( x ) );
- cout << "Set2:Element at [" << x << "] = " << anInt->getValue() << endl;
- }
-
- aSet1 += aSet2;
-
- maxCnt = aSet1.getSize();
-
- cout << endl ;
-
- for( Count x = 0; x < maxCnt; ++x )
- {
- UnsignedInteger *anInt = UnsignedInteger::castDown( aSet1.getElementAt( x ) );
- cout << "Set1:Element at [" << x << "] = " << anInt->getValue() << endl;
- }
-
- aSet1 += aRay;
- maxCnt = aSet1.getSize();
-
- cout << endl ;
-
- for( Count x = 0; x < maxCnt; ++x )
- {
- UnsignedInteger *anInt = UnsignedInteger::castDown( aSet1.getElementAt( x ) );
- cout << "Set1:Element at [" << x << "] = " << anInt->getValue() << endl;
- }
-
//
// Dispatch the method
--- 335,341 ----
***************
*** 652,688 ****
}
- void testAttributes( void )
- {
- AttributePtr a1 = Attribute::create();
- AttributePtr a2 = Attribute::create();
- UnsignedShortIntegerPtr aV1( new UnsignedShortInteger(8) );
- UnsignedShortIntegerPtr aV2( new UnsignedShortInteger(9) );
-
- a1->setKey( new FrameworkString("a1"));
- a1->setValue( aV1 );
-
- a2->setKey( new FrameworkString("a2"));
- a2->setValue(aV2);
-
- cout << endl;
- cout << "Compare att 1 = " << (a1->equals(a2) ? "true" : "false" ) << endl;
-
- a1->setKey(a2->getKey());
- 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() );
- }
//
// Dump info on types
--- 576,579 ----
|