You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(124) |
Nov
(120) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(6) |
Feb
(34) |
Mar
(49) |
Apr
(81) |
May
(25) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(37) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Frank V. C. <fr...@us...> - 2000-11-19 05:19:56
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv5509/src/testdrivers/exf1 Modified Files: examp1.cpp Log Message: 122753 LibraryLoader refit Index: examp1.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** examp1.cpp 2000/11/17 13:07:09 1.24 --- examp1.cpp 2000/11/19 05:19:52 1.25 *************** *** 289,296 **** dumpOntology(); - Library aLibrary; - - aLibrary.load( "something.so" ); - } catch( AssertionRef aAssert ) --- 289,292 ---- |
|
From: Frank V. C. <fr...@us...> - 2000-11-19 05:19:56
|
Update of /cvsroot/corelinux/clfw/clfw/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv5509/clfw/LibLoad Modified Files: LibraryInstance.hpp LibraryObject.hpp LibraryObjectRegistry.hpp Log Message: 122753 LibraryLoader refit Index: LibraryInstance.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryInstance.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryInstance.hpp 2000/11/19 03:18:28 1.2 --- LibraryInstance.hpp 2000/11/19 05:19:52 1.3 *************** *** 26,29 **** --- 26,33 ---- #endif + #if !defined(__METACLASS_HPP) + #include <MetaClass.hpp> + #endif + namespace corelinux { *************** *** 90,95 **** @param CharCptr to the name of the object @return The instance of the LibraryObject ! @exception NullPointerException if the name is ! the empty string */ --- 94,98 ---- @param CharCptr to the name of the object @return The instance of the LibraryObject ! @exception NullPointerException if the name is null */ *************** *** 107,110 **** --- 110,124 ---- throw ( NullPointerException )= 0; + /** + Returns the MetaClassPtr that represents the canonical + reference point from which all other types for this + library are subsumed + @return MetaClassPtr to top level class + */ + + virtual MetaClassPtr getObjectClassParent( void ) const ; + + + protected: *************** *** 114,119 **** LibraryObjectRegistry::createObject @param CharCptr to the name of the object ! @exception NullPointerException if the name is ! the empty string */ --- 128,132 ---- LibraryObjectRegistry::createObject @param CharCptr to the name of the object ! @exception NullPointerException if the name is null */ Index: LibraryObject.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryObject.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryObject.hpp 2000/11/19 03:18:28 1.2 --- LibraryObject.hpp 2000/11/19 05:19:52 1.3 *************** *** 35,44 **** /** ! LibraryObject is the individual of type LibraryObjectDefinition */ class LibraryObject : public Aggregate { - DECLARE_METATYPEMEMBERS( LibraryObject ); --- 35,46 ---- /** ! LibraryObject is the individual of type MetaTypeLibraryObject, ! derivations that are to be used in instantiating instances must ! support 'create' dispatch call that creates an instance ! of the class. */ class LibraryObject : public Aggregate { DECLARE_METATYPEMEMBERS( LibraryObject ); Index: LibraryObjectRegistry.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryObjectRegistry.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** LibraryObjectRegistry.hpp 2000/11/19 03:18:28 1.3 --- LibraryObjectRegistry.hpp 2000/11/19 05:19:52 1.4 *************** *** 54,65 **** DECLARE_TYPE( struct __LibObjectReference, LibObjectReference ); CORELINUX_MAP ( ! LibraryInstancePtr, LibObjectReference, ! less<LibraryInstancePtr>, ObjectInstanceMap ); /** The LibraryObjectRegistry --- 54,81 ---- DECLARE_TYPE( struct __LibObjectReference, LibObjectReference ); + struct KeyComp + { + bool operator()(CharCptr s1, CharCptr s2) const + { + return strcmp(s1, s2) < 0; + } + }; + CORELINUX_MAP ( ! CharCptr, LibObjectReference, ! KeyComp, ObjectInstanceMap ); + CORELINUX_MAP + ( + LibraryInstancePtr, + ObjectInstanceMap, + less<LibraryInstancePtr>, + LibraryInstanceMap + ); + /** The LibraryObjectRegistry *************** *** 94,100 **** /** Performs a lookup of the object description using the instance ! name as key. When the description is resolved, a library object ! instance is returned. The management of the LibraryObject ! instances is a responsibility of the LibraryObjectDefinition. @param LibraryInstance pointer to library instance. This is passed to the LibraryObjectDefinition if found. --- 110,117 ---- /** Performs a lookup of the object description using the instance ! name as key. When the description is resolved, a library ! objectinstance is returned. The management of the ! LibraryObject instances is a responsibility of the ! LibraryObject MetaClass @param LibraryInstance pointer to library instance. This is passed to the LibraryObjectDefinition if found. *************** *** 105,109 **** */ ! static LibraryObjectPtr createObject ( LibraryInstancePtr, --- 122,126 ---- */ ! static LibraryObjectPtr getObject ( LibraryInstancePtr, *************** *** 123,127 **** */ ! static void destroyObject( LibraryInstancePtr, LibraryObjectPtr ) throw ( NullPointerException ); --- 140,144 ---- */ ! static void returnObject( LibraryInstancePtr, LibraryObjectPtr ) throw ( NullPointerException ); *************** *** 134,148 **** // ! // Accessors // ! /// Return true if name is already a key ! bool isLibraryDefined( CharCptr ) const; - // - // Mutators - // protected: --- 151,182 ---- // ! // Mutators // ! /** ! This is called from the static method to resolve either ! from the registry cache, or via MetaClass lookup and ! calling the 'create' dispatch on the MetaClass child of ! LibraryObject ! @param LibraryInstancePtr to LibraryInstance ! @param CharCptr to LibraryObject type class name ! @return LibraryObjectPtr to instance or null if not found ! */ ! LibraryObjectPtr resolveObject ! ( ! LibraryInstancePtr, ! CharCptr ! ); + /** + This is called from the static method to either keep + the object in the cache, or get rid of it + @param LibraryInstancePtr to LibraryInstance + @param LibraryObject pointer. + */ + + void disgardObject( LibraryInstancePtr, LibraryObjectPtr ); protected: *************** *** 156,160 **** /// The map of libraries to their objects ! ObjectInstanceMap theInstances; }; --- 190,194 ---- /// The map of libraries to their objects ! LibraryInstanceMap theInstances; }; |
|
From: Frank V. C. <fr...@us...> - 2000-11-19 05:19:56
|
Update of /cvsroot/corelinux/clfw/src/libs/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv5509/src/libs/LibLoad Modified Files: LibraryInstance.cpp LibraryObjectRegistry.cpp Log Message: 122753 LibraryLoader refit Index: LibraryInstance.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryInstance.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** LibraryInstance.cpp 2000/11/19 03:18:28 1.3 --- LibraryInstance.cpp 2000/11/19 05:19:52 1.4 *************** *** 26,33 **** --- 26,41 ---- #endif + #if !defined(__METASPACE_HPP) + #include <MetaSpace.hpp> + #endif + #if !defined(__LIBRARYINSTANCE_HPP) #include INCL_LibraryInstance #endif + #if !defined(__LIBRARYOBJECT_HPP) + #include INCL_LibraryObject + #endif + #if !defined(__LIBRARYOBJECTREGISTRY_HPP) #include INCL_LibraryObjectRegistry *************** *** 129,132 **** --- 137,149 ---- // + // This is the default + // + + MetaClassPtr LibraryInstance::getObjectClassParent( void ) const + { + return MetaSpace::getClassForType( LibraryObject::getTypeDescriptor() ); + } + + // // Fetch the individual from the registry // *************** *** 138,142 **** throw ( NullPointerException ) { ! return LibraryObjectRegistry::createObject(this,aObjectName); } --- 155,159 ---- throw ( NullPointerException ) { ! return LibraryObjectRegistry::getObject(this,aObjectName); } *************** *** 148,152 **** throw ( NullPointerException ) { ! return LibraryObjectRegistry::destroyObject(this,aObject); } } --- 165,169 ---- throw ( NullPointerException ) { ! return LibraryObjectRegistry::returnObject(this,aObject); } } Index: LibraryObjectRegistry.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryObjectRegistry.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** LibraryObjectRegistry.cpp 2000/11/19 03:18:28 1.3 --- LibraryObjectRegistry.cpp 2000/11/19 05:19:52 1.4 *************** *** 37,40 **** --- 37,50 ---- #endif + #if !defined(__METASPACE_HPP) + #include <MetaSpace.hpp> + #endif + + #if !defined(__METACLASS_HPP) + #include <MetaClass.hpp> + #endif + + #include <cstring> + namespace corelinux { *************** *** 43,46 **** --- 53,127 ---- // + // Local function to find the metaclass that is of type + // and has the required method + // + + static CharPtr gCreateInstanceMethod( "create" ); + static CharPtr gDestroyInstanceMethod( "destroy" ); + + static LibraryObjectPtr fetchObject( CharCptr aName, MetaClassPtr aClass ) + { + LibraryObjectPtr aPtr( NULLPTR ); + + // + // Check this for name and matching method + // + + if( strcmp( aName, aClass->getInstanceTypeName() ) == 0 ) + { + Iterator<DispatchDescriptorPtr> *aMethodIterator + ( + aClass->createMethodIterator() + ); + + while( aMethodIterator->isValid() == true ) + { + if( strcmp + ( + gCreateInstanceMethod, + aMethodIterator->getElement()->theClassMethodName + ) == 0 ) + { + aClass->dispatch + ( + gCreateInstanceMethod, + (void **)NULLPTR, + (void *) &aPtr + ); + break; + } + else + { + aMethodIterator->setNext(); + } + } + aClass->destroyIterator( aMethodIterator ); + } + + // + // If we have no luck, we dig deeper + // + + if( aPtr == NULLPTR ) + { + Iterator<MetaClassPtr> *aChildIterator( aClass->createIterator() ); + while( aPtr == NULLPTR && aChildIterator->isValid() == true ) + { + aPtr = fetchObject( aName, aChildIterator->getElement() ); + aChildIterator->setNext(); + } + aClass->destroyIterator( aChildIterator ); + + } + else + { + ; // do nothing + } + + return aPtr; + } + + + // // Constructor // *************** *** 89,93 **** // ! LibraryObjectPtr LibraryObjectRegistry::createObject ( LibraryInstancePtr aLibraryInstance, --- 170,174 ---- // ! LibraryObjectPtr LibraryObjectRegistry::getObject ( LibraryInstancePtr aLibraryInstance, *************** *** 98,108 **** LibraryObjectPtr aLibraryObject( NULLPTR ); ! if( aLibraryInstance != NULLPTR && ! aName != NULLPTR ) { LibraryObjectRegistryPtr aLORPtr( theRegistry.instance() ); Guard myGuard( aLORPtr->access() ); ! } else --- 179,188 ---- LibraryObjectPtr aLibraryObject( NULLPTR ); ! if( aLibraryInstance != NULLPTR && aName != NULLPTR ) { LibraryObjectRegistryPtr aLORPtr( theRegistry.instance() ); Guard myGuard( aLORPtr->access() ); ! aLibraryObject = aLORPtr->resolveObject( aLibraryInstance, aName ); } else *************** *** 118,122 **** // ! void LibraryObjectRegistry::destroyObject ( LibraryInstancePtr aLibraryInstance, --- 198,202 ---- // ! void LibraryObjectRegistry::returnObject ( LibraryInstancePtr aLibraryInstance, *************** *** 129,134 **** LibraryObjectRegistryPtr aLORPtr( theRegistry.instance() ); Guard myGuard( aLORPtr->access() ); - } else --- 209,214 ---- LibraryObjectRegistryPtr aLORPtr( theRegistry.instance() ); Guard myGuard( aLORPtr->access() ); + aLORPtr->disgardObject( aLibraryInstance, aLibraryObject ); } else *************** *** 143,174 **** // ! // ! // Determine if the library name is registered as a key to definitions // ! bool LibraryObjectRegistry::isLibraryDefined ( ! CharCptr aLibrary ! ) const { ! GUARD; ! bool found(false); ! ObjectInstanceMapConstIterator begin( theInstances.begin() ); ! ObjectInstanceMapConstIterator end( theInstances.end() ); ! while( begin != end && found == false ) { ! if( strcmp( (*begin).first->getLibraryName(), aLibrary ) == 0 ) { ! found = true; } else { ! ++begin; } } ! return found; } } --- 223,355 ---- // ! ! // ! // Resolve using the cache or the ontology // ! LibraryObjectPtr LibraryObjectRegistry::resolveObject ( ! LibraryInstancePtr aInstance, ! CharCptr aObjectName ! ) { ! LibraryInstanceMapIterator aFItr( theInstances.find(aInstance) ); ! LibObjectReference aObjCache = {NULLPTR,1}; ! ! // ! // If the instance is found in cache, and the object ! // fetch and increment reference ! // ! if( aFItr != theInstances.end() ) { ! ObjectInstanceMapIterator aFOItr ! ( ! (*aFItr).second.find( aObjectName ) ! ); ! ! if( aFOItr != (*aFItr).second.end() ) { ! aObjCache.theLibObj = (*aFOItr).second.theLibObj; ! (*aFOItr).second.theCount += 1; } else { ! aObjCache.theLibObj = fetchObject ! ( ! aObjectName, ! aInstance->getObjectClassParent() ! ); ! if( aObjCache.theLibObj != NULLPTR ) ! { ! (*aFItr).second[aObjectName] = aObjCache; ! } ! else ! { ! ; // do nothing ! } } } ! ! // ! // Otherwise fetch an instance ! // ! else ! { ! aObjCache.theLibObj = fetchObject ! ( ! aObjectName, ! aInstance->getObjectClassParent() ! ); ! ! if( aObjCache.theLibObj != NULLPTR ) ! { ! ObjectInstanceMap aMap; ! ! aMap[aObjectName] = aObjCache; ! theInstances[aInstance] = aMap; ! } ! else ! { ! ; // do nothing ! } ! } ! ! return aObjCache.theLibObj; } + // + // Either keep it or let it go based on the references + // + + void LibraryObjectRegistry::disgardObject + ( + LibraryInstancePtr aInstance, + LibraryObjectPtr aObject + ) + { + LibraryInstanceMapIterator aFItr( theInstances.find(aInstance) ); + + if( aFItr != theInstances.end() ) + { + ObjectInstanceMapIterator aFOItr + ( + (*aFItr).second.find + ( + aObject->getType()->getInstanceTypeName() + ) + ); + + if( aFOItr != (*aFItr).second.end() ) + { + if( (*aFOItr).second.theCount == 1 ) + { + aObject->getType()->dispatch + ( + aObject, + gDestroyInstanceMethod, + (void **) NULLPTR, + (void *) NULLPTR + ); + + (*aFItr).second.erase( aFOItr ); + } + else + { + (*aFOItr).second.theCount -= 1; + } + + } + else + { + ; // exception ? + } + + } + else + { + ; // do nothing + } + } } |
|
From: Frank V. C. <fr...@us...> - 2000-11-19 03:18:31
|
Update of /cvsroot/corelinux/clfw/src/libs/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv20361/src/libs/LibLoad Modified Files: LibraryInstance.cpp LibraryObject.cpp LibraryObjectRegistry.cpp Makefile.am Removed Files: LibraryObjectDefinition.cpp Log Message: 122753 Refit LibraryLoad Index: LibraryInstance.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryInstance.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryInstance.cpp 2000/08/31 02:18:51 1.2 --- LibraryInstance.cpp 2000/11/19 03:18:28 1.3 *************** *** 34,37 **** --- 34,39 ---- #endif + #include <cstring> + namespace corelinux { *************** *** 40,49 **** // ! LibraryInstance::LibraryInstance( const std::string &aName ) throw ( NullPointerException ) : ! theLibraryName( aName ) { ! if( theLibraryName.empty() == true ) { throw NullPointerException(LOCATION); --- 42,51 ---- // ! LibraryInstance::LibraryInstance( CharCptr aName ) throw ( NullPointerException ) : ! theLibraryName( NULLPTR ) { ! if( aName == NULLPTR ) { throw NullPointerException(LOCATION); *************** *** 51,55 **** else { ! ; // do nothing } } --- 53,58 ---- else { ! theLibraryName = new char[strlen(aName)+1]; ! strcpy(theLibraryName,aName); } } *************** *** 61,65 **** LibraryInstance::LibraryInstance( void ) throw ( Assertion ) : ! theLibraryName() { NEVER_GET_HERE; --- 64,68 ---- LibraryInstance::LibraryInstance( void ) throw ( Assertion ) : ! theLibraryName(NULLPTR) { NEVER_GET_HERE; *************** *** 73,77 **** throw ( Assertion ) : ! theLibraryName() { NEVER_GET_HERE; --- 76,80 ---- throw ( Assertion ) : ! theLibraryName(NULLPTR) { NEVER_GET_HERE; *************** *** 84,88 **** LibraryInstance::~LibraryInstance( void ) { ! ; // do nothing } --- 87,99 ---- LibraryInstance::~LibraryInstance( void ) { ! if( theLibraryName != NULLPTR ) ! { ! delete [] theLibraryName; ! theLibraryName = NULLPTR; ! } ! else ! { ! ; // do nothing ! } } *************** *** 107,118 **** } - // - // Name coercion - // - - LibraryInstance::operator const std::string &( void ) const - { - return theLibraryName; - } // --- 118,121 ---- *************** *** 120,124 **** // ! const std::string & LibraryInstance::getLibraryName( void ) const { return theLibraryName; --- 123,127 ---- // ! CharCptr LibraryInstance::getLibraryName( void ) const { return theLibraryName; *************** *** 131,135 **** LibraryObjectPtr LibraryInstance::getLibraryObject ( ! const std::string & aObjectName ) throw ( NullPointerException ) --- 134,138 ---- LibraryObjectPtr LibraryInstance::getLibraryObject ( ! CharCptr aObjectName ) throw ( NullPointerException ) Index: LibraryObject.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryObject.cpp 2000/08/31 02:18:51 1.2 --- LibraryObject.cpp 2000/11/19 03:18:28 1.3 *************** *** 32,62 **** { LibraryObject::LibraryObject( void ) - throw ( Assertion ) : ! theName( "" ) { ! NEVER_GET_HERE; } // - // Valid Constructor - // - - LibraryObject::LibraryObject( const std::string & aName ) - : - theName( aName ) - { - ; // do nothing - } - - // // Copy constructor // ! LibraryObject::LibraryObject( LibraryObjectCref aLibraryObject ) : ! theName( aLibraryObject.getName() ) { ! } --- 32,50 ---- { LibraryObject::LibraryObject( void ) : ! Aggregate() { ! ; } // // Copy constructor // ! LibraryObject::LibraryObject( LibraryObjectCref ) : ! Aggregate() { ! NEVER_GET_HERE; } *************** *** 90,101 **** } ! // ! // Accessor for name ! // ! const std::string & LibraryObject::getName( void ) const ! { ! return theName; ! } } --- 78,115 ---- } ! // version LibraryObject for the MetaType ! const DwordCref version(1); ! ! // meta indentifier for the LibraryObject ! ! const UniversalIdentifier metaIdentifier ! ( ! "0829af44-accb-11d4-8df6-00500489272c" ! ); ! ! // Define LibraryObject parents ! ! OPEN_METATYPE_PARENTS( LibraryObject ) ! DEFINE_METATYPE_PARENT( Aggregate ) ! CLOSE_METATYPE_PARENT; ! ! // We construct the null values reference ! ! OPEN_INSTANCEDATA( LibraryObject ) ! CLOSE_INSTANCEDATA; ! ! DEFINE_DUMMY_DISPATCHTABLE( LibraryObject ); ! ! // we use the abstract macro for MetaTypeAggregate autonaming ! ! DEFINE_ABSTRACT_METATYPE ! ( ! LibraryObject, ! metaIdentifier, ! version , ! NULLPTR, ! "Abstract aggregate describing a library entity" ! ); } Index: LibraryObjectRegistry.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryObjectRegistry.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryObjectRegistry.cpp 2000/08/31 02:18:51 1.2 --- LibraryObjectRegistry.cpp 2000/11/19 03:18:28 1.3 *************** *** 33,40 **** #endif - #if !defined(__LIBRARYOBJECTDEFINITION_HPP) - #include INCL_LibraryObjectDefinition - #endif - #if !defined(__LIBRARYOBJECT_HPP) #include INCL_LibraryObject --- 33,36 ---- *************** *** 60,64 **** if( theRegistry.instance() == NULLPTR ) { ! theDefinitions.clear(); } else --- 56,60 ---- if( theRegistry.instance() == NULLPTR ) { ! theInstances.clear(); } else *************** *** 86,90 **** LibraryObjectRegistry::~LibraryObjectRegistry( void ) { ! theDefinitions.clear(); } --- 82,86 ---- LibraryObjectRegistry::~LibraryObjectRegistry( void ) { ! theInstances.clear(); } *************** *** 95,100 **** LibraryObjectPtr LibraryObjectRegistry::createObject ( ! LibraryInstancePtr aLibraryInstance, ! const std::string & aDefinitionName ) throw ( NullPointerException ) --- 91,96 ---- LibraryObjectPtr LibraryObjectRegistry::createObject ( ! LibraryInstancePtr aLibraryInstance, ! CharCptr aName ) throw ( NullPointerException ) *************** *** 102,125 **** LibraryObjectPtr aLibraryObject( NULLPTR ); ! if( aLibraryInstance != NULLPTR && aDefinitionName.empty() == false ) { - LibraryObjectDefinitionPtr aOdPtr( NULLPTR ); LibraryObjectRegistryPtr aLORPtr( theRegistry.instance() ); Guard myGuard( aLORPtr->access() ); - aOdPtr = aLORPtr->getDefinition - ( - aLibraryInstance->getLibraryName(), - aDefinitionName - ); - if( aOdPtr != NULLPTR ) - { - aLibraryObject = aOdPtr->createIndividual( aLibraryInstance ); - } - else - { - throw NullPointerException( LOCATION ); - } } else --- 98,108 ---- LibraryObjectPtr aLibraryObject( NULLPTR ); ! if( aLibraryInstance != NULLPTR && ! aName != NULLPTR ) { LibraryObjectRegistryPtr aLORPtr( theRegistry.instance() ); Guard myGuard( aLORPtr->access() ); } else *************** *** 144,242 **** if( aLibraryInstance != NULLPTR && aLibraryObject != NULLPTR ) { - LibraryObjectDefinitionPtr aOdPtr( NULLPTR ); LibraryObjectRegistryPtr aLORPtr( theRegistry.instance() ); Guard myGuard( aLORPtr->access() ); - aOdPtr = aLORPtr->getDefinition - ( - aLibraryInstance->getLibraryName(), - aLibraryObject->getName() - ); - - if( aOdPtr != NULLPTR ) - { - aOdPtr->destroyIndividual( aLibraryInstance, aLibraryObject ); - } - else - { - throw NullPointerException( LOCATION ); - } - } - else - { - throw NullPointerException( LOCATION ); - } - - } - - // - // Register a definition - // - - void LibraryObjectRegistry::registerObjectDefinition - ( - const std::string & aLibraryName, - LibraryObjectDefinitionPtr aDefinition - ) - throw ( NullPointerException ) - { - if( aDefinition != NULLPTR && !(aLibraryName.empty()) ) - { - // - // Put it in a collection to factor function - // - - ObjectDefinitions tm; - tm.insert - ( - ObjectDefinitions::value_type - ( - (const std::string &)(*aDefinition), - aDefinition - ) - ); - - theRegistry.instance()->addDefinition(aLibraryName,tm); - } - else - { - throw NullPointerException( LOCATION ); - } - } - - // - // Register a map of definitions - // - - void LibraryObjectRegistry::registerObjectDefinition - ( - const std::string & aLibraryName, - ObjectDefinitionsCref aDefinitionMap - ) - throw ( NullPointerException ) - { - if( aDefinitionMap.size() != 0 && !(aLibraryName.empty()) ) - { - theRegistry.instance()->addDefinition( aLibraryName, aDefinitionMap ); - } - else - { - throw NullPointerException( LOCATION ); - } - } - - // - // Deregister a single definition - // - void LibraryObjectRegistry::deregisterObjectDefinition - ( - const std::string & aLibraryName - ) - throw ( NullPointerException ) - { - if( ! ( aLibraryName.empty() ) ) - { - theRegistry.instance()->removeDefinition( aLibraryName ); } else --- 127,134 ---- *************** *** 244,311 **** throw NullPointerException( LOCATION ); } - } - // - // Deregister a single definition - // - - void LibraryObjectRegistry::deregisterObjectDefinition - ( - const std::string & aLibraryName, - LibraryObjectDefinitionPtr aDefinition - ) - throw ( NullPointerException ) - { - if( aDefinition != NULLPTR && ! ( aLibraryName.empty() ) ) - { - // - // Put it in a collection to factor function - // - - ObjectDefinitions tm; - tm.insert - ( - ObjectDefinitions::value_type - ( - (const std::string &)(*aDefinition), - aDefinition - ) - ); - - theRegistry.instance()->removeDefinition( aLibraryName, &tm ); - - } - else - { - throw NullPointerException( LOCATION ); - } } // - // Deregister a single definition - // - - void LibraryObjectRegistry::deregisterObjectDefinition - ( - const std::string & aLibraryName, - ObjectDefinitionsCref aDefinitionMap - ) - throw ( NullPointerException ) - { - if( aDefinitionMap.size() != 0 && ! ( aLibraryName.empty() ) ) - { - theRegistry.instance()->removeDefinition - ( - aLibraryName, - &aDefinitionMap - ); - } - else - { - throw NullPointerException( LOCATION ); - } - } - - // // Instance methods // --- 136,143 ---- *************** *** 317,504 **** bool LibraryObjectRegistry::isLibraryDefined ( ! const std::string & aLibrary ) const { GUARD; ! return ( theDefinitions.find( aLibrary ) != theDefinitions.end() ); ! } ! ! // ! // Resolve the definition ! // ! ! LibraryObjectDefinitionPtr LibraryObjectRegistry::getDefinition ! ( ! const std::string & aLibrary, ! const std::string & aDefinition ! ) ! { ! LibraryObjectDefinitionPtr aOdPtr( NULLPTR ); ! DefinitionMapIterator aLItr(theDefinitions.find( aLibrary )); ! ! if( aLItr != theDefinitions.end() ) { ! ObjectDefinitionsIterator aDItr((*aLItr).second.find(aDefinition)); ! if( aDItr != (*aLItr).second.end() ) { ! aOdPtr = (*aDItr).second; } else { ! ; // do nothing } - } - else - { - ; // do nothing } ! ! return aOdPtr; } - // Add a definition entry to the library key - - void LibraryObjectRegistry::addDefinition - ( - const std::string & aLibrary, - ObjectDefinitionsCref aObjectMap - ) - { - GUARD; - - DefinitionMapIterator aItr; - ObjectDefinitionsConstIterator begin(aObjectMap.begin()); - ObjectDefinitionsConstIterator end(aObjectMap.end()); - - // - // If the library is defined - // - - if( (aItr = theDefinitions.find( aLibrary )) != theDefinitions.end() ) - { - ; // do nothing - } - - // - // This is the first entry - // - - else - { - - ObjectDefinitions tm; - tm.insert - ( - ObjectDefinitions::value_type - ( - (*begin).first, - (*begin).second - ) - ); - - theDefinitions.insert( DefinitionMap::value_type(aLibrary,tm) ); - aItr = theDefinitions.find( aLibrary ); - ++begin; - } - - // - // And the entry does not collide, insert - // - - while( begin != end ) - { - if( (*aItr).second.find( (*begin).first ) == (*aItr).second.end() ) - { - (*aItr).second.insert - ( - ObjectDefinitions::value_type - ( - (*begin).first, - (*begin).second - ) - ); - } - - // - // Otherwise collide, type exception? - // - - else - { - NEVER_GET_HERE; - } - ++begin; - } - } - - // Add a definition entry to the library key - - void LibraryObjectRegistry::removeDefinition - ( - const std::string & aLibrary, - ObjectDefinitionsCptr aObjectMap - ) - { - GUARD; - - DefinitionMapIterator aItr(theDefinitions.find( aLibrary )); - - if( aItr != theDefinitions.end() ) - { - Count remain(0); - - // - // If it is a full library deregister - // - - if( aObjectMap == NULLPTR ) - { - ObjectDefinitionsIterator begin; - ObjectDefinitionsIterator end; - - // First clean out the definitions map - begin = (*aItr).second.begin(); - end = (*aItr).second.end(); - (*aItr).second.erase(begin,end); - } - - // - // Incremental removal - // - - else - { - ObjectDefinitionsConstIterator begin(aObjectMap->begin()); - ObjectDefinitionsConstIterator end(aObjectMap->end()); - - while( begin != end ) - { - (*aItr).second.erase( (*begin).first ); - ++begin; - } - - remain = Count( (*aItr).second.size() ); - } - - // - // Check for library removal - // - - if( remain == 0 ) - { - theDefinitions.erase(aItr); - } - else - { - - } - } - else - { - ; // do nothing? exception? - } - } } --- 149,175 ---- bool LibraryObjectRegistry::isLibraryDefined ( ! CharCptr aLibrary ) const { GUARD; ! bool found(false); ! ObjectInstanceMapConstIterator begin( theInstances.begin() ); ! ObjectInstanceMapConstIterator end( theInstances.end() ); ! while( begin != end && found == false ) { ! if( strcmp( (*begin).first->getLibraryName(), aLibrary ) == 0 ) { ! found = true; } else { ! ++begin; } } ! return found; } } Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile.am 2000/08/31 02:18:51 1.4 --- Makefile.am 2000/11/19 03:18:28 1.5 *************** *** 18,22 **** LibraryInstance.cpp \ LibraryObject.cpp \ - LibraryObjectDefinition.cpp \ LibraryObjectRegistry.cpp \ LibraryType.cpp \ --- 18,21 ---- --- LibraryObjectDefinition.cpp DELETED --- |
|
From: Frank V. C. <fr...@us...> - 2000-11-19 03:18:31
|
Update of /cvsroot/corelinux/clfw/clfw/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv20361/clfw/LibLoad Modified Files: LibraryInstance.hpp LibraryLoad.hpp LibraryObject.hpp LibraryObjectRegistry.hpp Makefile.am Removed Files: LibraryObjectDefinition.hpp Log Message: 122753 Refit LibraryLoad Index: LibraryInstance.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryInstance.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** LibraryInstance.hpp 2000/08/30 21:22:05 1.1 --- LibraryInstance.hpp 2000/11/19 03:18:28 1.2 *************** *** 22,31 **** */ ! #if !defined(__COMMON_HPP) ! #include <Common.hpp> #endif - #include <string> - namespace corelinux { --- 22,29 ---- */ ! #if !defined(__CLFWCOMMON_HPP) ! #include <ClfwCommon.hpp> #endif namespace corelinux { *************** *** 52,60 **** LibraryInstances are typically constructed by the Loader with the name of the library. ! @param std::string for library name @exception NullPointerException the empty string. */ ! LibraryInstance( const std::string & ) throw ( NullPointerException ); --- 50,58 ---- LibraryInstances are typically constructed by the Loader with the name of the library. ! @param CharCptr for library name @exception NullPointerException the empty string. */ ! LibraryInstance( CharCptr ) throw ( NullPointerException ); *************** *** 71,78 **** bool operator==( LibraryInstanceCref ) const; - /// Coercion operator for name - - operator const std::string &( void ) const; - // // Accessors --- 69,72 ---- *************** *** 81,85 **** /// Fetch the library name ! const std::string & getLibraryName( void ) const; // --- 75,79 ---- /// Fetch the library name ! CharCptr getLibraryName( void ) const; // *************** *** 94,98 **** Retrieves a LibraryObject instance from the LibraryInstance. ! @param std::string to the name of the object @return The instance of the LibraryObject @exception NullPointerException if the name is --- 88,92 ---- Retrieves a LibraryObject instance from the LibraryInstance. ! @param CharCptr to the name of the object @return The instance of the LibraryObject @exception NullPointerException if the name is *************** *** 100,104 **** */ ! virtual LibraryObjectPtr getObject( const std::string & ) throw ( NullPointerException )= 0; --- 94,98 ---- */ ! virtual LibraryObjectPtr getObject( CharCptr ) throw ( NullPointerException )= 0; *************** *** 119,128 **** resolve the library object from the Registry. Calls LibraryObjectRegistry::createObject ! @param std::string to the name of the object @exception NullPointerException if the name is the empty string */ ! LibraryObjectPtr getLibraryObject( const std::string & ) throw ( NullPointerException ); --- 113,122 ---- resolve the library object from the Registry. Calls LibraryObjectRegistry::createObject ! @param CharCptr to the name of the object @exception NullPointerException if the name is the empty string */ ! LibraryObjectPtr getLibraryObject( CharCptr ) throw ( NullPointerException ); *************** *** 159,163 **** /// The library name key ! std::string theLibraryName; }; --- 153,157 ---- /// The library name key ! CharPtr theLibraryName; }; Index: LibraryLoad.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryLoad.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** LibraryLoad.hpp 2000/11/18 22:43:13 1.3 --- LibraryLoad.hpp 2000/11/19 03:18:28 1.4 *************** *** 40,44 **** #define INCL_LibraryInstance <clfw/LibLoad/LibraryInstance.hpp> #define INCL_LibraryObject <clfw/LibLoad/LibraryObject.hpp> - #define INCL_LibraryObjectDefinition <clfw/LibLoad/LibraryObjectDefinition.hpp> #define INCL_LibraryObjectRegistry <clfw/LibLoad/LibraryObjectRegistry.hpp> --- 40,43 ---- Index: LibraryObject.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryObject.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** LibraryObject.hpp 2000/08/30 21:22:05 1.1 --- LibraryObject.hpp 2000/11/19 03:18:28 1.2 *************** *** 22,29 **** */ ! #if !defined(__COMMON_HPP) ! #include <Common.hpp> #endif namespace corelinux { --- 22,33 ---- */ ! #if !defined(__CLFWCOMMON_HPP) ! #include <ClfwCommon.hpp> #endif + #if !defined(__AGGREGATE_HPP) + #include <clfw/Aggregate.hpp> + #endif + namespace corelinux { *************** *** 34,40 **** */ ! class LibraryObject { public: --- 38,46 ---- */ ! class LibraryObject : public Aggregate { + DECLARE_METATYPEMEMBERS( LibraryObject ); + public: *************** *** 44,52 **** /// Default requires a name ! LibraryObject( const std::string & ); - /// Copy constructor - - LibraryObject( LibraryObjectCref ); /// Virtual destructor --- 50,55 ---- /// Default requires a name ! LibraryObject( void ); /// Virtual destructor *************** *** 65,72 **** // Accessors // - /// Access library object name - const std::string & getName( void ) const; - // // Mutators --- 68,72 ---- *************** *** 74,84 **** protected: - - // - // Constructor - // - /// Default constructor not reached ! LibraryObject( void ) throw ( Assertion ); // --- 74,81 ---- protected: ! /// Copy constructor ! ! LibraryObject( LibraryObjectCref ); // *************** *** 94,98 **** private: - const std::string & theName; }; } --- 91,94 ---- Index: LibraryObjectRegistry.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryObjectRegistry.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryObjectRegistry.hpp 2000/08/31 23:12:42 1.2 --- LibraryObjectRegistry.hpp 2000/11/19 03:18:28 1.3 *************** *** 22,42 **** */ ! #if !defined(__COMMON_HPP) ! #include <Common.hpp> ! #endif ! #if !defined(__SINGLETON_HPP) ! #include <Singleton.hpp> #endif ! #if !defined(__SET_HPP) ! #include <Set.hpp> #endif #if !defined(__MAP_HPP) ! #include <Map.hpp> #endif - #include <string> namespace corelinux --- 22,39 ---- */ ! #define LIBRARY_LOAD_FRAMWORK ! #if !defined(__CLFWCOMMON_HPP) ! #include <ClfwCommon.hpp> #endif ! #if !defined(__SINGLETON_HPP) ! #include <corelinux/Singleton.hpp> #endif #if !defined(__MAP_HPP) ! #include <corelinux/Map.hpp> #endif namespace corelinux *************** *** 46,69 **** // - DECLARE_CLASS( LibraryObject ); DECLARE_CLASS( LibraryInstance ); ! DECLARE_CLASS( LibraryObjectDefinition ); ! CORELINUX_MAP ! ( ! std::string, ! LibraryObjectDefinitionPtr, ! less<std::string>, ! ObjectDefinitions ! ); CORELINUX_MAP ( ! std::string, ! ObjectDefinitions, ! less<std::string>, ! DefinitionMap ! ); /** --- 43,64 ---- // DECLARE_CLASS( LibraryInstance ); ! DECLARE_CLASS( LibraryObject ); ! struct __LibObjectReference ! { ! LibraryObjectPtr theLibObj; ! Count theCount; ! }; ! DECLARE_TYPE( struct __LibObjectReference, LibObjectReference ); CORELINUX_MAP ( ! LibraryInstancePtr, ! LibObjectReference, ! less<LibraryInstancePtr>, ! ObjectInstanceMap ! ); /** *************** *** 104,111 **** @param LibraryInstance pointer to library instance. This is passed to the LibraryObjectDefinition if found. ! @param std::string reference to the name of the LibraryObject ! being resolved. @exception NullPointerException if instance pointer is null, ! or definition name is empty @return LibraryObject pointer. */ --- 99,105 ---- @param LibraryInstance pointer to library instance. This is passed to the LibraryObjectDefinition if found. ! @param CharCptr to the name of the LibraryObject being resolved. @exception NullPointerException if instance pointer is null, ! or definition name is null @return LibraryObject pointer. */ *************** *** 114,118 **** ( LibraryInstancePtr, ! const std::string & ) throw ( NullPointerException ); --- 108,112 ---- ( LibraryInstancePtr, ! CharCptr ) throw ( NullPointerException ); *************** *** 132,216 **** throw ( NullPointerException ); - // - // Registry methods - // - - /** - Registers a LibraryObjectDefinition prototype for the library - name - @param std::string reference to the library name - @param LibraryObjectDefinition instance - @exception NullPointerException if the LibraryObjectDefinition - is null, or if library name is empty string. - */ - - static void registerObjectDefinition - ( - const std::string &, - LibraryObjectDefinitionPtr - ) - throw ( NullPointerException ); - - /** - Registers a LibraryObjectDefinition prototype for the library - name - @param std::string reference to the library name - @param ObjectDefinitions collection of - LibraryObjectDefinition instances - @exception NullPointerException if the set is empty, - or if library name is empty string. - */ - - static void registerObjectDefinition - ( - const std::string &, - ObjectDefinitionsCref - ) - throw ( NullPointerException ); - - /** - Removes a LibraryObjectDefinition prototype from the library - name - @param std::string reference to the library name - @param LibraryObjectDefinition instance - @exception NullPointerException if the LibraryObjectDefinition - is null, or if library name is empty string. - */ - - static void deregisterObjectDefinition - ( - const std::string &, - LibraryObjectDefinitionPtr - ) - throw ( NullPointerException ); - - /** - Removes a collection of LibraryObjectDefinition from the - library name - @param std::string reference to the library name - @param ObjectDefinitions collection of LibraryObjectDefinition - instances - @exception NullPointerException if the set is empty, - or if library name is empty string. - */ - static void deregisterObjectDefinition - ( - const std::string &, - ObjectDefinitionsCref - ) - throw ( NullPointerException ); - - /** - Remove all the object defitions for a specific library - @param std::string reference to the library name - @exception NullPointerException if name is empty string - */ - - static void deregisterObjectDefinition( const std::string & ) - throw ( NullPointerException ); - - - protected: /// Copy constructor not allowed --- 126,130 ---- *************** *** 225,257 **** /// Return true if name is already a key ! bool isLibraryDefined( const std::string & ) const; - /// Return the definition associated to the library name - LibraryObjectDefinitionPtr getDefinition - ( - const std::string &, - const std::string & - ); - // // Mutators // - /// Add a definition object to the library map - - void addDefinition - ( - const std::string & , - ObjectDefinitionsCref - ); - - /// Add a definition object to the library map - - void removeDefinition - ( - const std::string & aLibraryName, - ObjectDefinitionsCptr aMap = NULLPTR - ); protected: --- 139,149 ---- /// Return true if name is already a key ! bool isLibraryDefined( CharCptr ) const; // // Mutators // protected: *************** *** 262,268 **** private: ! /// The map of libraries to their object definitions ! DefinitionMap theDefinitions; }; --- 154,160 ---- private: ! /// The map of libraries to their objects ! ObjectInstanceMap theInstances; }; Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 2000/09/05 01:21:33 1.2 --- Makefile.am 2000/11/19 03:18:28 1.3 *************** *** 6,10 **** # E-MAIL: fr...@us... # ORIG-DATE: 10-Apr-00 at 10:34:57 ! # LAST-MOD: 4-Sep-00 at 21:08:30 by Christophe Prud'homme # DESCRIPTION: # DESCRIP-END. --- 6,10 ---- # E-MAIL: fr...@us... # ORIG-DATE: 10-Apr-00 at 10:34:57 ! # LAST-MOD: $Id$ # DESCRIPTION: # DESCRIP-END. *************** *** 21,25 **** LibraryInstance.hpp \ LibraryObject.hpp \ - LibraryObjectDefinition.hpp \ LibraryObjectRegistry.hpp \ LibraryType.hpp --- 21,31 ---- LibraryInstance.hpp \ LibraryObject.hpp \ LibraryObjectRegistry.hpp \ LibraryType.hpp + + # Common rcs information do not modify + # $Author$ + # $Revision$ + # $Date$ + # $Locker$ + --- LibraryObjectDefinition.hpp DELETED --- |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 22:45:25
|
Update of /cvsroot/corelinux/clfll/clfll In directory slayer.i.sourceforge.net:/tmp/cvs-serv590/clfll Modified Files: Makefile.am Added Files: FunctionLibraryType.hpp FunctionLoader.hpp Log Message: 112702 Function Library Loader ***** Error reading new file: (2, 'No such file or directory') ***** Error reading new file: (2, 'No such file or directory') Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfll/clfll/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Makefile.am 2000/11/02 21:17:27 1.1.1.1 --- Makefile.am 2000/11/18 22:45:22 1.2 *************** *** 13,16 **** --- 13,18 ---- include_HEADERS = ClfllCommon.hpp \ + FunctionLoader.hpp \ + FunctionLibraryType.hpp \ Makefile.am |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 22:45:25
|
Update of /cvsroot/corelinux/clfll/src/clfll In directory slayer.i.sourceforge.net:/tmp/cvs-serv590/src/clfll Modified Files: Makefile.am Added Files: FunctionLibraryType.cpp FunctionLoader.cpp Log Message: 112702 Function Library Loader ***** Error reading new file: (2, 'No such file or directory') ***** Error reading new file: (2, 'No such file or directory') Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfll/src/clfll/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Makefile.am 2000/11/02 21:16:00 1.1.1.1 --- Makefile.am 2000/11/18 22:45:22 1.2 *************** *** 12,16 **** SUFFIXES = .cpp .hpp .c .h .f .F .o .moc ! SRCS = clfll.cpp lib_LTLIBRARIES = libclfll++.la --- 12,19 ---- SUFFIXES = .cpp .hpp .c .h .f .F .o .moc ! SRCS = clfll.cpp \ ! FunctionLoader.cpp \ ! FunctionLibraryType.cpp \ ! Makefile.am lib_LTLIBRARIES = libclfll++.la |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 22:45:25
|
Update of /cvsroot/corelinux/clfll/src/testdrivers/exfl1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv590/src/testdrivers/exfl1 Modified Files: examp1.cpp Log Message: 112702 Function Library Loader Index: examp1.cpp =================================================================== RCS file: /cvsroot/corelinux/clfll/src/testdrivers/exfl1/examp1.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** examp1.cpp 2000/11/18 20:10:11 1.1 --- examp1.cpp 2000/11/18 22:45:22 1.2 *************** *** 42,45 **** --- 42,58 ---- #endif + #if !defined(__METASPACE_HPP) + #include <clfw/MetaSpace.hpp> + #endif + + #if !defined(__METACLASS_HPP) + #include <clfw/MetaClass.hpp> + #endif + + #if !defined(__ONTOLOGY_HPP) + #include <clfw/Ontology.hpp> + #endif + + #include INCL_Library |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 22:45:24
|
Update of /cvsroot/corelinux/clfll In directory slayer.i.sourceforge.net:/tmp/cvs-serv590 Modified Files: configure.in Log Message: 112702 Function Library Loader Index: configure.in =================================================================== RCS file: /cvsroot/corelinux/clfll/configure.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** configure.in 2000/11/03 12:35:02 1.2 --- configure.in 2000/11/18 22:45:21 1.3 *************** *** 77,81 **** dnl Checks for typedefs, structures, and compiler characteristics. ! CPPFLAGS="${CPPFLAGS} -I\$(top_srcdir)/fll/ -I\$(srcdir)/include" dnl Checks for library functions. --- 77,81 ---- dnl Checks for typedefs, structures, and compiler characteristics. ! CPPFLAGS="${CPPFLAGS} -I\$(top_srcdir)/clfll/ -I\$(srcdir)/include" dnl Checks for library functions. *************** *** 125,128 **** clfll/Makefile \ src/Makefile \ ! src/clfll/Makefile, [ chmod +x debian/rules ] ) --- 125,130 ---- clfll/Makefile \ src/Makefile \ ! src/clfll/Makefile \ ! src/testdrivers/Makefile \ ! src/testdrivers/exfl1/Makefile , [ chmod +x debian/rules ] ) |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 22:43:20
|
Update of /cvsroot/corelinux/clfw/clfw/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv481/clfw/LibLoad Modified Files: LibraryLoad.hpp Log Message: 122753 LibraryLoad refit Index: LibraryLoad.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryLoad.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryLoad.hpp 2000/08/31 02:18:51 1.2 --- LibraryLoad.hpp 2000/11/18 22:43:13 1.3 *************** *** 32,45 **** #endif // if !defined(__LIBRARYLOAD_HPP) ! #define INCL_Library <LibLoad/Library.hpp> ! #define INCL_LibraryException <LibLoad/LibraryException.hpp> ! #define INCL_LibraryType <LibLoad/LibraryType.hpp> ! #define INCL_Loader <LibLoad/Loader.hpp> ! #define INCL_LoadException <LibLoad/LoadException.hpp> ! #define INCL_LoaderNotFoundException <LibLoad/LoaderNotFoundException.hpp> ! #define INCL_LibraryInstance <LibLoad/LibraryInstance.hpp> ! #define INCL_LibraryObject <LibLoad/LibraryObject.hpp> ! #define INCL_LibraryObjectDefinition <LibLoad/LibraryObjectDefinition.hpp> ! #define INCL_LibraryObjectRegistry <LibLoad/LibraryObjectRegistry.hpp> /* --- 32,45 ---- #endif // if !defined(__LIBRARYLOAD_HPP) ! #define INCL_Library <clfw/LibLoad/Library.hpp> ! #define INCL_LibraryException <clfw/LibLoad/LibraryException.hpp> ! #define INCL_LibraryType <clfw/LibLoad/LibraryType.hpp> ! #define INCL_Loader <clfw/LibLoad/Loader.hpp> ! #define INCL_LoadException <clfw/LibLoad/LoadException.hpp> ! #define INCL_LoaderNotFoundException <clfw/LibLoad/LoaderNotFoundException.hpp> ! #define INCL_LibraryInstance <clfw/LibLoad/LibraryInstance.hpp> ! #define INCL_LibraryObject <clfw/LibLoad/LibraryObject.hpp> ! #define INCL_LibraryObjectDefinition <clfw/LibLoad/LibraryObjectDefinition.hpp> ! #define INCL_LibraryObjectRegistry <clfw/LibLoad/LibraryObjectRegistry.hpp> /* |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 22:43:20
|
Update of /cvsroot/corelinux/clfw/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv481/doc Modified Files: clfw.cfg.in Log Message: 122753 LibraryLoad refit Index: clfw.cfg.in =================================================================== RCS file: /cvsroot/corelinux/clfw/doc/clfw.cfg.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** clfw.cfg.in 2000/11/17 13:07:08 1.6 --- clfw.cfg.in 2000/11/18 22:43:14 1.7 *************** *** 35,38 **** --- 35,39 ---- GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES + VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to warning and progress messages *************** *** 51,55 **** RECURSIVE = YES EXCLUDE = ! EXCLUDE_PATTERNS = */corelinux/* EXAMPLE_PATH = ../src/testdrivers/ EXAMPLE_PATTERNS = --- 52,56 ---- RECURSIVE = YES EXCLUDE = ! EXCLUDE_PATTERNS = */corelinux/*.hpp EXAMPLE_PATH = ../src/testdrivers/ EXAMPLE_PATTERNS = |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 20:38:49
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv8076 Modified Files: MetaClass.cpp Log Message: 122619 Fatten MetaClass Index: MetaClass.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaClass.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** MetaClass.cpp 2000/11/17 13:07:09 1.5 --- MetaClass.cpp 2000/11/18 20:38:46 1.6 *************** *** 332,336 **** throw( NullPointerException, DescriptorNotFound ) { ! theType->dispatch(NULLPTR,aName,args,ret); } --- 332,336 ---- throw( NullPointerException, DescriptorNotFound ) { ! theType->dispatch(aName,args,ret); } |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 20:10:16
|
Update of /cvsroot/corelinux/clfll/src/testdrivers/exfl1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv4861/exfl1 Added Files: Makefile.am examp1.cpp Log Message: Initial Load ***** Error reading new file: (2, 'No such file or directory') ***** Error reading new file: (2, 'No such file or directory') |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 20:10:16
|
Update of /cvsroot/corelinux/clfll/src/testdrivers In directory slayer.i.sourceforge.net:/tmp/cvs-serv4861 Added Files: Makefile.am Log Message: Initial Load ***** Error reading new file: (2, 'No such file or directory') |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 20:09:05
|
Update of /cvsroot/corelinux/clfll/src/testdrivers/exfl1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv4732/exfl1 Log Message: Directory /cvsroot/corelinux/clfll/src/testdrivers/exfl1 added to the repository |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 14:25:10
|
Update of /cvsroot/corelinux/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv15115 Modified Files: ChangeLog Log Message: 122770 - DISPATCH spelled DISPATH Index: ChangeLog =================================================================== RCS file: /cvsroot/corelinux/clfw/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** ChangeLog 2000/11/15 04:34:27 1.12 --- ChangeLog 2000/11/18 14:25:07 1.13 *************** *** 1,2 **** --- 1,9 ---- + 2000-11-18 Frank V. Castellucci <fr...@ca...> + + # Defect 122770 - DISPATCH spelled DISPATH + * Defect 122769 - DISPATCH_STATIC_FUNCTION macro declares argument + * Feature 122619 - MetaClass bridges MetaType, requires fatter interface on MetaClass + * Feature 122753 - Refit LibraryLoad abstraction to leverage new MetaClass + 2000-11-14 Frank V. Castellucci <fr...@ca...> |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 14:25:10
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv15115/src/testdrivers/exf1 Modified Files: UserType.cpp Log Message: 122770 - DISPATCH spelled DISPATH Index: UserType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/UserType.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** UserType.cpp 2000/11/15 01:14:32 1.3 --- UserType.cpp 2000/11/18 14:25:07 1.4 *************** *** 122,126 **** DISPATCH_FUNCTION_NORETURN( UserType, addToAccumulator ) myPointer->addToAccumulator( (UnsignedShortIntegerCref) args[0] ); ! CLOSE_DISPATH_FUNCTION; // --- 122,126 ---- DISPATCH_FUNCTION_NORETURN( UserType, addToAccumulator ) myPointer->addToAccumulator( (UnsignedShortIntegerCref) args[0] ); ! CLOSE_DISPATCH_FUNCTION; // *************** *** 141,145 **** OPEN_DISPATCH_TABLE( UserType ) DEFINE_DISPATCH_ENTRY( UserType,addToAccumulator) ! CLOSE_DISPATH_TABLE; //! The ontology describes UserType as an Aggregate --- 141,145 ---- OPEN_DISPATCH_TABLE( UserType ) DEFINE_DISPATCH_ENTRY( UserType,addToAccumulator) ! CLOSE_DISPATCH_TABLE; //! The ontology describes UserType as an Aggregate |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 14:20:45
|
Update of /cvsroot/corelinux/clfw/src/libs/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv14683 Modified Files: LibraryType.cpp Log Message: 122753 Refit Library Load Abstraction Index: LibraryType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryType.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** LibraryType.cpp 2000/11/18 14:18:44 1.8 --- LibraryType.cpp 2000/11/18 14:20:43 1.9 *************** *** 74,78 **** // ! LibraryTypeRef LibraryType::operator=( LibraryTypeCref aLibraryType ) { return ( *this ); --- 74,78 ---- // ! LibraryTypeRef LibraryType::operator=( LibraryTypeCref ) { return ( *this ); |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 14:18:48
|
Update of /cvsroot/corelinux/clfw/src/libs/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv14413 Modified Files: LibraryType.cpp Log Message: 122753 Refit Library Load Abstraction Index: LibraryType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryType.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** LibraryType.cpp 2000/11/18 14:15:44 1.7 --- LibraryType.cpp 2000/11/18 14:18:44 1.8 *************** *** 47,51 **** LibraryType::LibraryType( LibraryTypeCref aType ) : ! Aggregate() { ; // do nothing --- 47,51 ---- LibraryType::LibraryType( LibraryTypeCref aType ) : ! Aggregate( aType ) { ; // do nothing |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 14:16:15
|
Update of /cvsroot/corelinux/clfw/clfw/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv14200 Modified Files: LibraryObjectDefinition.hpp Log Message: 122753 Refit Library Load Abstraction Index: LibraryObjectDefinition.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryObjectDefinition.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LibraryObjectDefinition.hpp 2000/10/29 17:09:52 1.2 --- LibraryObjectDefinition.hpp 2000/11/18 14:16:12 1.3 *************** *** 30,35 **** #endif - #include <string> - namespace corelinux { --- 30,33 ---- *************** *** 108,116 **** virtual void destroyIndividual( LibraryInstancePtr, LibraryObjectPtr ) = 0; - /** @name Data members for Meta access - */ - //@{ - DECLARE_INSTANCEDATA( string, DefinitionName ); - //@} protected: --- 106,109 ---- |
|
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" + ); } |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 14:05:47
|
Update of /cvsroot/corelinux/clfw/clfw/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv13068 Modified Files: LibraryType.hpp Loader.hpp Log Message: 122753 Refit Library Load Abstraction Index: LibraryType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/LibraryType.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** LibraryType.hpp 2000/10/29 17:09:52 1.4 --- LibraryType.hpp 2000/11/18 14:04:58 1.5 *************** *** 30,35 **** #endif - #include <string> - namespace corelinux { --- 30,33 ---- *************** *** 37,42 **** /** ! LibraryType enables identification of Loaders ! based on type. */ --- 35,39 ---- /** ! LibraryType enables identification of Loaders based on type. */ *************** *** 71,78 **** bool operator==( LibraryTypeCref ) const; - /// Less than operator - - bool operator<( LibraryTypeCref ) const; - /// Assignment operator --- 68,71 ---- *************** *** 83,91 **** // - /** @name Data members for Meta access - */ - //@{ - DECLARE_INSTANCEDATA( string, TypeName ); - //@} protected: --- 76,79 ---- Index: Loader.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/LibLoad/Loader.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Loader.hpp 2000/08/31 02:18:51 1.2 --- Loader.hpp 2000/11/18 14:04:58 1.3 *************** *** 28,36 **** #endif #if !defined(__LOADEXCEPTION_HPP) #include INCL_LoadException #endif - #include <string> namespace corelinux --- 28,39 ---- #endif + #if !defined(__AGGREGATE_HPP) + #include <clfw/Aggregate.hpp> + #endif + #if !defined(__LOADEXCEPTION_HPP) #include INCL_LoadException #endif namespace corelinux *************** *** 44,49 **** */ ! class Loader { public: --- 47,54 ---- */ ! class Loader : public Aggregate { + DECLARE_METATYPEMEMBERS( Loader ); + public: *************** *** 53,62 **** /** ! Default constructor, takes an optional ! name binding ! @param Char pointer to or null */ ! Loader( const std::string & aName = "" ); /// Virtual Destructor --- 58,65 ---- /** ! Default constructor */ ! Loader( void ); /// Virtual Destructor *************** *** 76,83 **** // - /// Returns name assigned to loader - - const std::string & getLoaderName( void ) const; - // // Load routines --- 79,82 ---- *************** *** 85,89 **** /** Load is the request to access the identified library ! @param std::string for name of library @return LibraryInstance instance of LibraryInstance @exception CantLoadException if for some reason the library --- 84,88 ---- /** Load is the request to access the identified library ! @param CharPtr for name of library @return LibraryInstance instance of LibraryInstance @exception CantLoadException if for some reason the library *************** *** 91,95 **** */ ! virtual LibraryInstancePtr load( const std::string & ) throw ( LoadException ) = 0; --- 90,94 ---- */ ! virtual LibraryInstancePtr load( CharPtr ) throw ( LoadException ) = 0; *************** *** 108,114 **** private: - /// Name, if supplied - - std::string theLoaderName; }; } --- 107,110 ---- |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 13:59:00
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv12285 Modified Files: MetaType.hpp Log Message: 122770 - DISPATCH spelled DISPATH Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** MetaType.hpp 2000/11/18 13:53:25 1.26 --- MetaType.hpp 2000/11/18 13:58:57 1.27 *************** *** 384,388 **** { ! #define CLOSE_DISPATH_FUNCTION \ } --- 384,388 ---- { ! #define CLOSE_DISPATCH_FUNCTION \ } *************** *** 392,396 **** \arg className : identifies the class \arg classMethName : identifies the class method that is called ! \arg methName : identifies the dispath function */ --- 392,396 ---- \arg className : identifies the class \arg classMethName : identifies the class method that is called ! \arg methName : identifies the dispatch function */ *************** *** 406,410 **** &className##Dispatch##methName, ! #define CLOSE_DISPATH_TABLE \ 0 } --- 406,410 ---- &className##Dispatch##methName, ! #define CLOSE_DISPATCH_TABLE \ 0 } |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 13:53:27
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv11928 Modified Files: MetaType.hpp Log Message: 122769 - MetaType Macro Defect Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** MetaType.hpp 2000/11/15 23:21:24 1.25 --- MetaType.hpp 2000/11/18 13:53:25 1.26 *************** *** 378,382 **** static void className##methName \ ( \ ! corelinux::FrameworkEntityPtr aClass, \ void **args, \ void *ret \ --- 378,382 ---- static void className##methName \ ( \ ! corelinux::FrameworkEntityPtr , \ void **args, \ void *ret \ |
|
From: Frank V. C. <fr...@us...> - 2000-11-18 03:35:25
|
Update of /cvsroot/corelinux/clfw/src/libs/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv29061/src/libs/LibLoad Modified Files: Library.cpp Log Message: 122753 Library Load Re-implementation Index: Library.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/Library.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Library.cpp 2000/11/17 13:07:09 1.3 --- Library.cpp 2000/11/18 03:35:22 1.4 *************** *** 43,46 **** --- 43,47 ---- static CharPtr gTestMethod( "handlesType" ); static CharPtr gGetLoaderMethod( "getLoaderType" ); + static CharPtr gGetLibraryInstanceMethod( "loadInstance" ); static MetaClassPtr findHandler( CharPtr aName, MetaClassPtr aClass ) *************** *** 70,74 **** ( gTestMethod, ! (void **)&aName, (void *) &results ); --- 71,75 ---- ( gTestMethod, ! (void **)aName, (void *) &results ); *************** *** 120,125 **** Library::Library( void ) - : - theLoaderMap() { ; // do nothing --- 121,124 ---- *************** *** 164,221 **** // - // Registers a loader as per the type argument - // - - LoaderPtr Library::registerLoader( LibraryTypeRef aType, LoaderPtr aLoader ) - throw ( NullPointerException ) - { - LoaderPtr aOldLoader( NULLPTR ); - if( aLoader != NULLPTR ) - { - if( theLoaderMap.find(aType) != theLoaderMap.end() ) - { - aOldLoader = this->deregisterLoader(aType); - } - else - { - ; // do nothing - } - - theLoaderMap[aType] = aLoader; - - } - else - { - throw NullPointerException( LOCATION ); - } - - return aOldLoader; - } - - // - // Removes the loader associated with the type and - // return to the caller. - // - - LoaderPtr Library::deregisterLoader( LibraryTypeRef aType ) - throw ( LoaderNotFoundException ) - { - LoaderPtr aLoader( NULLPTR ); - TypeMapIterator aFItr( theLoaderMap.find(aType) ); - - if( aFItr != theLoaderMap.end() ) - { - aLoader = (*aFItr).second; - theLoaderMap.erase(aFItr); - } - else - { - throw LoaderNotFoundException( LOCATION ); - } - - return aLoader; - } - - // // Work the magic of ontologies! // --- 163,166 ---- *************** *** 239,243 **** else { ! } } --- 184,188 ---- else { ! aInstance = this->loadInstance( aName, aClass ); } } *************** *** 250,291 **** // ! LibraryInstancePtr Library::load( CharPtr, MetaClassPtr ) throw (NullPointerException, LoaderNotFoundException) { LibraryInstancePtr aInstance( NULLPTR ); - return aInstance; - } ! // ! // Request the loader actually load a library instance ! // ! LibraryInstancePtr Library::load( const std::string & aLibraryName, LibraryTypeRef aType ) ! throw ( NullPointerException, LoaderNotFoundException ) ! { ! LibraryInstancePtr aInstance( NULLPTR ); ! TypeMapIterator aFItr( theLoaderMap.find(aType) ); ! if( aFItr != theLoaderMap.end() ) ! { ! aInstance = (*aFItr).second->load(aLibraryName); ! if( aInstance == NULLPTR ) { ! throw NullPointerException( LOCATION ); } else { ! ; // do nothing } } ! else ! { ! throw LoaderNotFoundException( LOCATION ); ! } return aInstance; } // ! // Setup the traversal looking for an appropriate handler // --- 195,233 ---- // ! LibraryInstancePtr Library::load( CharPtr aName , MetaClassPtr aClass ) throw (NullPointerException, LoaderNotFoundException) { LibraryInstancePtr aInstance( NULLPTR ); ! if( aName == NULLPTR || aClass == NULLPTR ) ! { ! throw NullPointerException( LOCATION ); ! } ! else ! { ! bool results(false); ! aClass->dispatch ! ( ! gTestMethod, ! (void **)aName, ! (void *) &results ! ); ! if( results == true ) { ! aInstance = this->loadInstance( aName, aClass ); } else { ! throw LoaderNotFoundException( LOCATION ); } } ! return aInstance; } // ! // Setup the recursion looking for an appropriate handler // *************** *** 298,301 **** --- 240,294 ---- ); } + + // + // The actual work + // + + LibraryInstancePtr Library::loadInstance + ( + CharPtr aLibrary, + MetaClassPtr aTypeClass + ) + { + LibraryInstancePtr aInstance( NULLPTR ); + + // + // First we get the Loader from the LibraryType as it is + // the holder of the goods + // + + MetaTypePtr aLoaderType( NULLPTR ); + + aTypeClass->dispatch + ( + gGetLoaderMethod, + (void **)NULLPTR, + (void *) &aLoaderType + ); + + if( aLoaderType != NULLPTR ) + { + aLoaderType->dispatch + ( + gGetLibraryInstanceMethod, + (void **)aLibrary, + (void *) &aInstance + ); + + } + else + { + throw LoaderNotFoundException( LOCATION ); + } + + + // + // Then we get the loader to create a library + // instance + // + + return aInstance; + } + } |