|
From: Frank V. C. <fr...@us...> - 2000-10-03 02:14:09
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv20350/src/libs/clfw Modified Files: Makefile.am MetaType.cpp UniversalIdentifier.cpp Added Files: FrameworkEntity.cpp Log Message: 113427 MetaType and FrameworkEntity ***** Error reading new file: (2, 'No such file or directory') Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile.am 2000/10/01 15:56:21 1.3 --- Makefile.am 2000/10/03 02:14:03 1.4 *************** *** 12,16 **** SUFFIXES = .cpp .hpp .c .h .f .F .o .moc ! SRCS = clfw.cpp MetaType.cpp UniversalIdentifier.cpp LIBS = --- 12,20 ---- SUFFIXES = .cpp .hpp .c .h .f .F .o .moc ! SRCS = clfw.cpp \ ! MetaType.cpp \ ! UniversalIdentifier.cpp \ ! FrameworkEntity.cpp ! LIBS = Index: MetaType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaType.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MetaType.cpp 2000/09/26 11:21:11 1.1 --- MetaType.cpp 2000/10/03 02:14:03 1.2 *************** *** 27,42 **** #endif namespace corelinux { ! MetaType::MetaType( void ) { ; } ! MetaType::MetaType( MetaTypeCref ) { ; } MetaType::~MetaType( void ) { --- 27,107 ---- #endif + const Dword gNoVersion(0); + namespace corelinux { ! // ! // Abstract metaclass constructor ! // ! ! MetaType::MetaType ! ( ! UniversalIdentifierCref aMetaTypeUid, ! DwordCref aVersion, ! DwordCref aSize, ! MetaTypeCptr *aParentArray, ! CharCptr aTypeName, ! CharCptr aMetaTypeName ! ) throw ( Assertion ) ! : ! theVersion( aVersion ), ! theInstanceSize( aSize ), ! theTypeId( aMetaTypeUid ), ! theBaseClasses( aParentArray ), ! theInstanceTypeName( aTypeName ), ! theMetaTypeName( aMetaTypeName ), ! theFactoryAllocator( NULLPTR ) { ; } ! // ! // Default metaclass constructor ! // ! ! MetaType::MetaType ! ( ! UniversalIdentifierCref aMetaTypeUid, ! DwordCref aVersion, ! DwordCref aSize, ! MetaTypeCptr *aParentArray, ! CharCptr aTypeName, ! CharCptr aMetaTypeName, ! AllocatorPtr aAllocation ! ) throw ( Assertion ) ! : ! theVersion( aVersion ), ! theInstanceSize( aSize ), ! theTypeId( aMetaTypeUid ), ! theBaseClasses( aParentArray ), ! theInstanceTypeName( aTypeName ), ! theMetaTypeName( aMetaTypeName ), ! theFactoryAllocator( aAllocation ) { ; } + // + // Default constructor + // + + MetaType::MetaType( void ) throw ( Assertion ) + : + theVersion( gNoVersion ), + theInstanceSize( gNoVersion ), + theTypeId( UniversalIdentifier::getZeroUid() ) + { + NEVER_GET_HERE; + } + + MetaType::MetaType( MetaTypeCref aMetaType ) throw ( Assertion ) + : + theVersion( gNoVersion ), + theInstanceSize( gNoVersion ), + theTypeId(aMetaType.theTypeId) + { + NEVER_GET_HERE; + } + MetaType::~MetaType( void ) { *************** *** 44,62 **** } ! bool MetaType::isType( MetaTypeCref ) const { ! return true; } ! bool MetaType::isType( MetaTypeCptr ) const ! throw ( Assertion ) { ! return true; } ! bool MetaType::isTypeOf( MetaTypeCptr ) const ! throw ( Assertion ) { ! return true; } --- 109,178 ---- } ! UniversalIdentifierCref MetaType::getIdentifier( void ) const { ! return theTypeId; } ! DwordCref MetaType::getTypeVersion( void ) const { ! return theVersion; } ! MetaTypeCptr *const MetaType::getParentTypes( void ) const { ! return theBaseClasses; ! } ! ! CharCptr MetaType::getInstanceTypeName( void ) const ! { ! return theInstanceTypeName; ! } ! ! CharCptr MetaType::getMetaTypeName( void ) const ! { ! return theMetaTypeName; ! } ! ! AllocatorPtr MetaType::getAllocator( void ) const ! { ! return theFactoryAllocator; ! } ! ! bool MetaType::isType( MetaTypeCptr aTypePtr ) const throw ( Assertion ) ! { ! REQUIRE( aTypePtr != NULLPTR ); ! return ( this == aTypePtr ) ; ! } ! ! bool MetaType::isTypeOf( MetaTypeCptr aTypePtr ) const throw ( Assertion ) ! { ! REQUIRE( aTypePtr != NULLPTR ); ! ! bool aTypeOf( false ); ! ! aTypeOf = this->isType( aTypePtr ); ! ! if( aTypeOf == false ) ! { ! MetaTypeCptr *pMt = theBaseClasses; ! while(*pMt != NULLPTR ) ! { ! if( (*pMt++)->isType(aTypePtr) == true ) ! { ! aTypeOf = true; ! break; ! } ! else ! { ! ; // do nothing ! } ! } ! } ! else ! { ! ; // do nothing ! } ! ! return aTypeOf; } Index: UniversalIdentifier.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/UniversalIdentifier.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** UniversalIdentifier.cpp 2000/10/01 15:56:21 1.1 --- UniversalIdentifier.cpp 2000/10/03 02:14:03 1.2 *************** *** 53,57 **** theID(zeroUUID) { ! ; // do nothing } --- 53,57 ---- theID(zeroUUID) { ! uuid_generate_time(BytePtr(&theID)); } *************** *** 81,85 **** REQUIRE( aCharUid != NULLPTR ); ! uuid_parse(aCharUid,(unsigned char*)&theID); } --- 81,85 ---- REQUIRE( aCharUid != NULLPTR ); ! uuid_parse(aCharUid,BytePtr(&theID)); } *************** *** 151,155 **** { REQUIRE( aCharUid != NULLPTR ); ! uuid_parse(aCharUid,(unsigned char*)&theID); return (*this); } --- 151,155 ---- { REQUIRE( aCharUid != NULLPTR ); ! uuid_parse(aCharUid,BytePtr(&theID)); return (*this); } *************** *** 211,214 **** --- 211,224 ---- } + // Create a new uuid + + void UniversalIdentifier::setNewUid( UniversalIdentifierRef aUiRef ) + { + UniqueId aUuid; + uuid_generate_time(BytePtr(&aUuid)); + aUiRef = aUuid; + } + + // Check greater *************** *** 217,222 **** return ( uuid_compare ( ! (BytePtr)&theID, ! (BytePtr)&((UniversalIdentifierCref)aIdRef).theID ) == 1 ? true : false ); } --- 227,232 ---- return ( uuid_compare ( ! BytePtr(&theID), ! BytePtr(&(UniversalIdentifierCref(aIdRef).theID)) ) == 1 ? true : false ); } *************** *** 228,233 **** return ( uuid_compare ( ! (BytePtr)&theID, ! (BytePtr)&((UniversalIdentifierCref)aIdRef).theID ) == -1 ? true : false ); } --- 238,243 ---- return ( uuid_compare ( ! BytePtr(&theID), ! BytePtr(&(UniversalIdentifierCref(aIdRef).theID)) ) == -1 ? true : false ); } *************** *** 242,247 **** return ( uuid_compare ( ! (BytePtr)&theID, ! (BytePtr)&((UniversalIdentifierCref)aIdRef).theID ) < 1 ? true : false ); } --- 252,257 ---- return ( uuid_compare ( ! BytePtr(&theID), ! BytePtr(&(UniversalIdentifierCref(aIdRef).theID)) ) < 1 ? true : false ); } *************** *** 256,261 **** return ( uuid_compare ( ! (BytePtr)&theID, ! (BytePtr)&((UniversalIdentifierCref)aIdRef).theID ) != -1 ? true : false ); } --- 266,271 ---- return ( uuid_compare ( ! BytePtr(&theID), ! BytePtr(&(UniversalIdentifierCref(aIdRef).theID)) ) != -1 ? true : false ); } *************** *** 267,272 **** return ( uuid_compare ( ! (BytePtr)&theID, ! (BytePtr)&((UniversalIdentifierCref)aIdRef).theID ) == 0 ? true : false ); --- 277,282 ---- return ( uuid_compare ( ! BytePtr(&theID), ! BytePtr(&(UniversalIdentifierCref(aIdRef).theID)) ) == 0 ? true : false ); |