|
From: Frank V. C. <fr...@us...> - 2000-11-18 14:15:47
|
Update of /cvsroot/corelinux/clfw/src/libs/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv14161 Modified Files: LibraryObjectDefinition.cpp LibraryType.cpp Loader.cpp Log Message: 122753 Refit Library Load Abstraction Index: LibraryObjectDefinition.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryObjectDefinition.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** LibraryObjectDefinition.cpp 2000/11/11 17:45:54 1.4 --- LibraryObjectDefinition.cpp 2000/11/18 14:15:44 1.5 *************** *** 19,25 **** */ - /*! \file LibraryObjectDefinition.cpp - */ - #define LIBRARY_LOAD_FRAMWORK --- 19,22 ---- *************** *** 34,78 **** namespace corelinux { - //! version LibraryType for the MetaType - - const DwordCref version(1); - - //! meta indentifier for the LibraryType - - const UniversalIdentifier metaIdentifier - ( - "0829af44-accb-11d4-8df6-00500489272c" - ); - - //! ahh, our first foray into ontologies - - OPEN_METATYPE_PARENTS( LibraryObjectDefinition ) - DEFINE_METATYPE_PARENT( Aggregate ) - CLOSE_METATYPE_PARENT; - - //! because this is a abstract base entity, there are no members either - - //! We define our property data descriptor - - DEFINE_INSTANCEDATA_DESCRIPTOR(LibraryObjectDefinition,string,DefinitionName); - - //! We construct the values reference - - OPEN_INSTANCEDATA( LibraryObjectDefinition ) - DEFINE_INSTANCEDATA( LibraryObjectDefinition, DefinitionName ) - CLOSE_INSTANCEDATA; - - DEFINE_DUMMY_DISPATCHTABLE( LibraryObjectDefinition ); - - //! we use the abstract macro for MetaTypeAggregate autonaming - - DEFINE_ABSTRACT_METATYPE - ( - LibraryObjectDefinition, - metaIdentifier, - version , - NULLPTR, - "Abstract aggregate describing a tuple of a library" - ); // --- 31,34 ---- *************** *** 120,124 **** ) const { ! return ( this->getDefinitionName() == aObjectDefinition.getDefinitionName() ); } --- 76,80 ---- ) const { ! return ( this == &aObjectDefinition ); } *************** *** 137,140 **** --- 93,134 ---- } + // + // MetaType information + // + + // version LibraryType for the MetaType + + const DwordCref version(1); + + // meta indentifier for the LibraryObjectDefinition + + const UniversalIdentifier metaIdentifier + ( + "0829af44-accb-11d4-8df6-00500489272c" + ); + + // Define LibraryObjectDefinition parents + + OPEN_METATYPE_PARENTS( LibraryObjectDefinition ) + DEFINE_METATYPE_PARENT( Aggregate ) + CLOSE_METATYPE_PARENT; + + // We construct the null values reference + + OPEN_INSTANCEDATA( LibraryObjectDefinition ) + CLOSE_INSTANCEDATA; + + DEFINE_DUMMY_DISPATCHTABLE( LibraryObjectDefinition ); + + // we use the abstract macro for MetaTypeAggregate autonaming + + DEFINE_ABSTRACT_METATYPE + ( + LibraryObjectDefinition, + metaIdentifier, + version , + NULLPTR, + "Abstract aggregate describing a tuple of a library" + ); } Index: LibraryType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryType.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** LibraryType.cpp 2000/11/11 17:45:54 1.6 --- LibraryType.cpp 2000/11/18 14:15:44 1.7 *************** *** 19,25 **** */ - /*! \file LibraryType.cpp - */ - #define LIBRARY_LOAD_FRAMWORK --- 19,22 ---- *************** *** 34,79 **** namespace corelinux { - //! version LibraryType for the MetaType - - const DwordCref version(1); - - //! meta indentifier for the LibraryType - - const UniversalIdentifier metaIdentifier - ( - "98df59ba-a9df-11d4-9cd8-00500489272c" - ); - - //! ahh, our first foray into ontologies - - OPEN_METATYPE_PARENTS( LibraryType ) - DEFINE_METATYPE_PARENT( Aggregate ) - CLOSE_METATYPE_PARENT; - - //! because this is a abstract base entity, there are no members either - - //! We define our property data descriptor - - DEFINE_INSTANCEDATA_DESCRIPTOR(LibraryType,string,TypeName); - - //! We construct the values reference - - OPEN_INSTANCEDATA( LibraryType ) - DEFINE_INSTANCEDATA( LibraryType, TypeName ) - CLOSE_INSTANCEDATA; - - DEFINE_DUMMY_DISPATCHTABLE( LibraryType ); - - //! we use the abstract macro for MetaTypeAggregate autonaming - - DEFINE_METATYPE - ( - LibraryType, - metaIdentifier, - version, - NULLPTR , - "Aggregate type that describes computer library types" - ); - // // Constructor --- 31,34 ---- *************** *** 82,87 **** LibraryType::LibraryType( void ) : ! Aggregate(), ! theTypeName() { } --- 37,41 ---- LibraryType::LibraryType( void ) : ! Aggregate() { } *************** *** 93,98 **** LibraryType::LibraryType( LibraryTypeCref aType ) : ! Aggregate(), ! theTypeName(aType.getTypeName()) { ; // do nothing --- 47,51 ---- LibraryType::LibraryType( LibraryTypeCref aType ) : ! Aggregate() { ; // do nothing *************** *** 114,147 **** bool LibraryType::operator==( LibraryTypeCref aLibraryType ) const { ! return (theTypeName == aLibraryType.getTypeName()); } // ! // Less than // ! bool LibraryType::operator <( LibraryTypeCref aLibraryType ) const { ! return ( aLibraryType.getTypeName() < theTypeName ); } // ! // Assignment operator // ! LibraryTypeRef LibraryType::operator=( LibraryTypeCref aLibraryType ) ! { ! if( *this == aLibraryType ) ! { ! ; // do nothing ! } ! else ! { ! theTypeName = aLibraryType.getTypeName(); ! } ! return ( *this ); ! } } --- 67,123 ---- bool LibraryType::operator==( LibraryTypeCref aLibraryType ) const { ! return ( this == &aLibraryType ); } // ! // Assignment operator // ! LibraryTypeRef LibraryType::operator=( LibraryTypeCref aLibraryType ) { ! return ( *this ); } // ! // MetaType information block // ! // version LibraryType for the MetaType ! const DwordCref version(1); + // meta indentifier for the LibraryType + + const UniversalIdentifier metaIdentifier + ( + "98df59ba-a9df-11d4-9cd8-00500489272c" + ); + + // Define parents + + OPEN_METATYPE_PARENTS( LibraryType ) + DEFINE_METATYPE_PARENT( Aggregate ) + CLOSE_METATYPE_PARENT; + + // We construct the null values reference + + OPEN_INSTANCEDATA( LibraryType ) + CLOSE_INSTANCEDATA; + + // We construct the null dispatch table + + DEFINE_DUMMY_DISPATCHTABLE( LibraryType ); + + // we use the abstract macro for MetaTypeAggregate autonaming + + DEFINE_ABSTRACT_METATYPE + ( + LibraryType, + metaIdentifier, + version, + NULLPTR , + "Aggregate type that describes computer library types" + ); + } Index: Loader.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/Loader.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Loader.cpp 2000/08/31 02:18:51 1.2 --- Loader.cpp 2000/11/18 14:15:44 1.3 *************** *** 29,38 **** #endif - extern "C" - { - #include <string.h> - } - - namespace corelinux { --- 29,32 ---- *************** *** 41,47 **** // ! Loader::Loader( const std::string & aName ) : ! theLoaderName( aName ) { ; // do nothing --- 35,41 ---- // ! Loader::Loader( void ) : ! Aggregate() { ; // do nothing *************** *** 54,58 **** Loader::Loader( LoaderCref aLoader ) : ! theLoaderName( aLoader.getLoaderName() ) { ; // do nothing --- 48,52 ---- Loader::Loader( LoaderCref aLoader ) : ! Aggregate( aLoader ) { ; // do nothing *************** *** 74,89 **** bool Loader::operator==( LoaderCref aLoader ) const { ! bool isMe(false); ! ! if( this != &aLoader ) ! { ! isMe = ( this->getLoaderName() == aLoader.getLoaderName() ); ! } ! else ! { ! isMe = true; ! } ! ! return isMe; } --- 68,72 ---- bool Loader::operator==( LoaderCref aLoader ) const { ! return ( this == &aLoader ); } *************** *** 92,117 **** // ! LoaderRef Loader::operator=( LoaderCref aLoader ) { - if( this->operator==(aLoader) == false ) - { - theLoaderName = aLoader.getLoaderName(); - } - else - { - ; // do nothing - } return ( *this ); } ! // ! // Name accessor ! // ! const std::string & Loader::getLoaderName( void ) const ! { ! return theLoaderName; ! } } --- 75,117 ---- // ! LoaderRef Loader::operator=( LoaderCref ) { return ( *this ); } ! //! version Loader for the MetaType ! const DwordCref version(1); ! ! //! meta indentifier for the Loader ! ! const UniversalIdentifier metaIdentifier ! ( ! "2f57b638-bd0b-11d4-8235-00500489272c" ! ); ! ! // Loader is an aggregate ! ! OPEN_METATYPE_PARENTS( Loader ) ! DEFINE_METATYPE_PARENT( Aggregate ) ! CLOSE_METATYPE_PARENT; ! ! // We construct the null values reference ! ! OPEN_INSTANCEDATA( Loader ) ! CLOSE_INSTANCEDATA; ! ! DEFINE_DUMMY_DISPATCHTABLE( Loader ); ! ! // we use the abstract macro for MetaTypeAggregate autonaming + DEFINE_ABSTRACT_METATYPE + ( + Loader, + metaIdentifier, + version, + NULLPTR , + "Aggregate type that describes loaders of computer libraries" + ); } |