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-15 04:33:04
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv1096/clfw Modified Files: MetaClass.hpp MetaSpace.hpp Ontology.hpp Log Message: 116737 Ontology work Index: MetaClass.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaClass.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MetaClass.hpp 2000/11/15 01:14:31 1.1 --- MetaClass.hpp 2000/11/15 04:33:01 1.2 *************** *** 41,45 **** /** MetaClass is the aggregate node information about a MetaType in ! a Ontology, which for now is limited to hierarchical information */ --- 41,45 ---- /** MetaClass is the aggregate node information about a MetaType in ! a Ontology, which for now is limited to hierarchical information. */ *************** *** 71,74 **** --- 71,82 ---- bool operator==( MetaClassCref ) const; + /// Return the object type for this meta class + + CharCptr getTypeName( void ) const; + + /// Return the name of the meta class + + CharCptr getMetaName( void ) const; + /** Retrieve the MetaType associated with this *************** *** 115,118 **** --- 123,152 ---- /** + Create a iterator over the parents of this composite + @return Iterator<MetaClassCptr> pointer + */ + + virtual Iterator<MetaClassCptr>* createParentIterator( void ) + throw( InvalidCompositeException ); + + /** + Create a iterator over the data member declarations of + this composite + @return Iterator<MemberDescriptorCptr> pointer + */ + + virtual Iterator<MemberDescriptorCptr> *createMemberIterator( void ) + throw( InvalidCompositeException ); + + /** + Create a iterator over the methods of + this composite + @return Iterator<DispatchDescriptorCptr> pointer + */ + + virtual Iterator<DispatchDescriptorCptr> *createMethodIterator( void ) + throw( InvalidCompositeException ); + + /** Destroy the iterator @param Iterator<MetaClassCptr> pointer *************** *** 122,140 **** --- 156,202 ---- throw( InvalidCompositeException ); + /** + Destroy the iterator + @param Iterator<MetaClassCptr> pointer + */ + + virtual void destroyIterator( Iterator<MemberDescriptorCptr> * ) + throw( InvalidCompositeException ); + + /** + Destroy the iterator + @param Iterator<MetaClassCptr> pointer + */ + + virtual void destroyIterator( Iterator<DispatchDescriptorCptr> * ) + throw( InvalidCompositeException ); protected: private: + /// Default constructor not used + MetaClass( void ); + /// Copy constructor not used + MetaClass( MetaClassCref ); + /// Used by Ontology to create a new class + MetaClass( MetaTypeCptr ); + /// Assignment operator not used + MetaClassRef operator=( MetaClassCref ); private: + /// The underlying MetaType + MetaTypeCptr theType; + + /// The composite children + Children theChildren; }; Index: MetaSpace.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaSpace.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** MetaSpace.hpp 2000/11/15 01:14:31 1.3 --- MetaSpace.hpp 2000/11/15 04:33:01 1.4 *************** *** 30,36 **** DECLARE_CLASS( Ontology ); DECLARE_CLASS( MetaSpace ); ! /*! ! \class MetaSpace manages domain Ontologies */ --- 30,37 ---- DECLARE_CLASS( Ontology ); DECLARE_CLASS( MetaSpace ); + DECLARE_CLASS( MetaClass ); ! /** ! MetaSpace manages domain Ontologies */ *************** *** 41,44 **** --- 42,53 ---- /** + Given a meta type, get it's meta class + @param MetaType const pointer to type + @return MetaClass const pointer to class + */ + + static MetaClassCptr getClassForType( MetaTypeCptr ); + + /** stores a metatype prior to initialize @param MetaType const pointer to type *************** *** 51,54 **** --- 60,64 ---- @param char pointer to domain name, or if null return the corelinux domain + @return Ontology pointer */ *************** *** 57,61 **** /** Initialize the MetaSpace, creating ! namespace hierarchies as necessary */ --- 67,71 ---- /** Initialize the MetaSpace, creating ! namespace ontologies as necessary */ *************** *** 66,77 **** --- 76,97 ---- private: + /// Default constructor not used + MetaSpace( void ); + /// Copy constructor not used + MetaSpace( MetaSpaceCref ); + /// Destructor not used + ~MetaSpace( void ); + /// Assignment operator not used + MetaSpaceRef operator=( MetaSpaceCref ); + /// Equality operator not used + bool operator==( MetaSpaceCref ) const; *************** *** 79,84 **** --- 99,112 ---- private: + /// Transient types or ontologies + static VoidPtr theHead; + + /// Flag of initialization + static bool theInitializedFlag; + + /// The default (base) domain (corelinux) + static CharCptr theDefaultDomain; Index: Ontology.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Ontology.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Ontology.hpp 2000/11/15 01:14:31 1.4 --- Ontology.hpp 2000/11/15 04:33:01 1.5 *************** *** 48,52 **** /** ! An Ontology represents a domain semantic network lattice */ --- 48,52 ---- /** ! An Ontology represents a domain semantic network */ |
|
From: Frank V. C. <fr...@us...> - 2000-11-15 04:33:04
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv1096/src/testdrivers/exf1 Modified Files: examp1.cpp Log Message: 116737 Ontology work Index: examp1.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** examp1.cpp 2000/11/15 01:14:32 1.20 --- examp1.cpp 2000/11/15 04:33:02 1.21 *************** *** 105,113 **** --- 105,120 ---- void dumpMetaTypeInformation( MetaTypeCptr ); void dumpTypeInformation( FrameworkEntityPtr ); + void dumpInstanceMembers( MetaTypeCptr ); + void dumpInstanceMembers( MetaClassPtr ); + void dumpInstanceFunctions( MetaTypeCptr ); + void dumpInstanceFunctions( MetaClassPtr ); + void dumpParents( MetaTypeCptr ); + void dumpParents( MetaClassPtr ); void testDispatch( void ); + void walkOntology( MetaClassPtr , int ); void dumpOntology( void ); *************** *** 265,273 **** // Ontology *aOntology( MetaSpace::getOntology("corelinux") ); if( aOntology != NULLPTR ) { ! cout << "Have ontology " << aOntology->getDomainName() << endl; Iterator<MetaClassCptr> *aIterator( aOntology->createRootIterator()); --- 272,282 ---- // + cout << endl; + Ontology *aOntology( MetaSpace::getOntology("corelinux") ); if( aOntology != NULLPTR ) { ! cout << "Dumping ontology " << aOntology->getDomainName() << endl; Iterator<MetaClassCptr> *aIterator( aOntology->createRootIterator()); *************** *** 470,473 **** --- 479,504 ---- } + void dumpParents( MetaClassPtr aMCPtr ) + { + Iterator<MetaClassCptr> *aIterator + ( + aMCPtr->createParentIterator() + ); + + while( aIterator->isValid() ) + { + cout + << "\tClass = " << aIterator->getElement()->getTypeName() + << endl + << "\tMetaType = " << aIterator->getElement()->getMetaName() + << endl; + aIterator->setNext(); + } + + aMCPtr->destroyIterator( aIterator ); + + } + + // // Data member information *************** *** 534,537 **** --- 565,620 ---- } + void dumpInstanceMembers( MetaClassPtr aMCPtr ) + { + Iterator<MemberDescriptorCptr> *aIterator + ( + aMCPtr->createMemberIterator() + ); + + while( aIterator->isValid() ) + { + MemberDescriptorCptr anElement( aIterator->getElement() ); + + cout << "\tVar name = " << anElement->theTypeVariableName + << endl; + cout << "\tVar type = " << anElement->theTypeName + << endl; + cout << "\tVar size = " << anElement->theSizeInBytes + << endl; + + if( anElement->theTypePointer != NULLPTR ) + { + cout << "\tClass type = " + << anElement->theTypePointer->getInstanceTypeName() + << endl; + } + else + { + cout << "\tNot a FrameworkEntity" << endl; + } + + if( anElement->theGetter != NULLPTR ) + { + cout << "\tHas getter " << endl; + } + else + { + ; // do nothing + } + if( anElement->theSetter != NULLPTR ) + { + cout << "\tHas setter " << endl; + } + else + { + ; // do nothing + } + aIterator->setNext(); + } + + aMCPtr->destroyIterator( aIterator ); + + } + void dumpInstanceFunctions( MetaTypeCptr aMTPtr ) { *************** *** 561,564 **** --- 644,663 ---- } + void dumpInstanceFunctions( MetaClassPtr aMCPtr ) + { + Iterator<DispatchDescriptorCptr> *aIterator + ( + aMCPtr->createMethodIterator() + ); + + while( aIterator->isValid() ) + { + cout << "\tFunction name = " << + aIterator->getElement()->theClassMethodName << endl; + aIterator->setNext(); + } + + aMCPtr->destroyIterator( aIterator ); + } // |
|
From: Frank V. C. <fr...@us...> - 2000-11-15 04:33:04
|
Update of /cvsroot/corelinux/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv1096 Modified Files: README Log Message: 116737 Ontology work Index: README =================================================================== RCS file: /cvsroot/corelinux/clfw/README,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** README 2000/11/10 04:42:47 1.12 --- README 2000/11/15 04:33:01 1.13 *************** *** 18,25 **** 0. Pre-pre-amble ! New interface on MetaType allows a dispatch without the need for providing a ! FrameworkEntity pointer. This enables static methods or functions that don't ! require the object to be called. See ChangeLog for more details --- 18,42 ---- 0. Pre-pre-amble ! Quite a bit was added in regards to the whole meta thing. At the highest level ! is the MetaSpace which manages Ontologies which are the semantic network of ! MetaClass composites which are the fat wrappers of MetaType. + Ontologies are organized in a namespace fashion, although the standard of using + that is implementation defined. + + The core ontology (named 'corelinux' (natch)) is autopopulated by virtue of + the MetaType constructors. + + Care must be taken to call the MetaSpace::initialize() prior to using any + of the Ontology or MetaClass functionality. + + Even though the example (clfw/src/testdrivers/exf1) shows off the + MetaSpace/Ontology/MetaClass, the real work will be in our updates to the + Library Load framework abstraction. + + Whew! + + Did anyone say this wouldn't be fun? + See ChangeLog for more details *************** *** 29,33 **** libclfw requires libuuid ! libclfw-0.2.4 require libcorelinux at least 0.4.29 Documentation --- 46,50 ---- libclfw requires libuuid ! libclfw-0.2.5 require libcorelinux at least 0.4.29 Documentation |
|
From: Frank V. C. <fr...@us...> - 2000-11-15 01:14:36
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv20673/src/libs/clfw Modified Files: Makefile.am MetaSpace.cpp MetaType.cpp Ontology.cpp Added Files: MetaClass.cpp Log Message: 116737 Ontology ***** 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.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** Makefile.am 2000/11/11 17:45:54 1.15 --- Makefile.am 2000/11/15 01:14:32 1.16 *************** *** 30,33 **** --- 30,34 ---- UnsignedInteger.cpp \ MetaSpace.cpp \ + MetaClass.cpp \ Ontology.cpp \ UnsignedShortInteger.cpp Index: MetaSpace.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaSpace.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MetaSpace.cpp 2000/11/12 03:22:06 1.2 --- MetaSpace.cpp 2000/11/15 01:14:32 1.3 *************** *** 136,139 **** --- 136,168 ---- } + OntologyPtr MetaSpace::getOntology( CharCptr domain ) + { + OntologyPtr aPtr( NULLPTR ); + + if( MetaSpace::theInitializedFlag == true ) + { + OntologyMapPtr theMap( (OntologyMapPtr)MetaSpace::theHead ); + OntologyMapIterator aFItr + ( + theMap->find( domain ? domain : MetaSpace::theDefaultDomain ) + ); + + if( aFItr != theMap->end() ) + { + aPtr = (*aFItr).second; + } + else + { + ; // do nothing + } + } + else + { + + } + + return aPtr; + } + // // Initialize all ontologies by domain name (namespaces) *************** *** 149,152 **** --- 178,182 ---- MetaSpaceLinkPtr aLink = (MetaSpaceLinkPtr)MetaSpace::theHead; + MetaSpace::theHead = NULLPTR; // *************** *** 166,170 **** if( aFItr == theMap->end() ) { ! OntologyPtr aOntology = new Ontology( aMT->getDomainName() ); (*theMap)[aOntology->getDomainName()] = aOntology; } --- 196,200 ---- if( aFItr == theMap->end() ) { ! aOntology = new Ontology( aMT->getDomainName() ); (*theMap)[aOntology->getDomainName()] = aOntology; } *************** *** 174,191 **** } ! aOntology->addMetaType( aMT ); MetaSpaceLinkPtr aTmp = aLink; aLink = (MetaSpaceLinkPtr)aLink->next; delete aTmp; } // // Now go and initialize the corelinux first before the others // aFItr = theMap->find(MetaSpace::theDefaultDomain); ! if( aFItr != theMap->end() ) { ! } else --- 204,235 ---- } ! aOntology->seedMetaType( aMT ); ! MetaSpaceLinkPtr aTmp = aLink; + aLink = (MetaSpaceLinkPtr)aLink->next; + delete aTmp; } // + // Setup for initialization and checks + // + + MetaSpace::theHead = (VoidPtr)theMap; + aOntology = NULLPTR ; + + + // // Now go and initialize the corelinux first before the others // + OntologyMapIterator aEnd(theMap->end()); + aFItr = theMap->find(MetaSpace::theDefaultDomain); ! if( aFItr != aEnd ) { ! aOntology = (*aFItr).second; ! aOntology->initialize(); } else *************** *** 195,202 **** aFItr = theMap->begin(); ! while( aFItr != theMap->end() ) { } } --- 239,256 ---- aFItr = theMap->begin(); ! while( aFItr != aEnd ) { + if( (*aFItr).second != aOntology ) + { + (*aFItr).second->initialize(); + } + else + { + ; // do nothing + } + ++aFItr; } + } Index: MetaType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaType.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** MetaType.cpp 2000/11/11 17:45:54 1.14 --- MetaType.cpp 2000/11/15 01:14:32 1.15 *************** *** 171,179 **** // Get the list of parents ! MetaTypeCptr *const MetaType::getParentTypes( void ) const { return theBaseClasses; } // Get the list of data members --- 171,195 ---- // Get the list of parents ! MetaTypeCptr *const MetaType::getParentTypes( void ) const { return theBaseClasses; } + // Get the count of parents + + Count MetaType::getParentCount( void ) const + { + Count aValue(0); + MetaTypeCptr *pMt( this->getParentTypes() ); + + while(*pMt++ != NULLPTR ) + { + ++aValue; + } + + return aValue; + } + + // Get the list of data members *************** *** 183,186 **** --- 199,217 ---- } + // Get the count of members declared + + Count MetaType::getInstanceMemberCount( void ) const + { + Count aValue(0); + MemberDescriptorCptr *pMt( this->getInstanceMembers() ); + + while(*pMt++ != NULLPTR ) + { + ++aValue; + } + + return aValue; + } + // Get the list of function dispatch descriptors *************** *** 188,191 **** --- 219,237 ---- { return theDispatchFunctions; + } + + // Get the count of members declared + + Count MetaType::getInstanceFunctionCount( void ) const + { + Count aValue(0); + DispatchDescriptorCptr *pMt( this->getInstanceFunctions() ); + + while(*pMt++ != NULLPTR ) + { + ++aValue; + } + + return aValue; } Index: Ontology.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Ontology.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Ontology.cpp 2000/11/12 03:22:06 1.3 --- Ontology.cpp 2000/11/15 01:14:32 1.4 *************** *** 27,30 **** --- 27,42 ---- #endif + #if !defined(__METASPACE_HPP) + #include <MetaSpace.hpp> + #endif + + #if !defined(__METACLASS_HPP) + #include <MetaClass.hpp> + #endif + + #if !defined(__CORELINUXASSOCIATIVEITERATOR_HPP) + #include <corelinux/CoreLinuxAssociativeIterator.hpp> + #endif + #include <cstring> *************** *** 32,38 **** { Ontology::Ontology( CharCptr aDomain ) : ! theDomainName( NULLPTR ) { if( aDomain == NULLPTR || (*aDomain == Char( 0 )) ) --- 44,55 ---- { + // + // Default constructor requires a name + // + Ontology::Ontology( CharCptr aDomain ) : ! theDomainName( NULLPTR ), ! theInitializedFlag( false ) { if( aDomain == NULLPTR || (*aDomain == Char( 0 )) ) *************** *** 47,60 **** --- 64,95 ---- } + // + // Unused constructor + // + Ontology::Ontology( void ) + : + theDomainName( NULLPTR ), + theInitializedFlag( false ) { } + // + // Unused copy constructor + // + Ontology::Ontology( OntologyCref ) + : + theDomainName( NULLPTR ), + theInitializedFlag( false ) { } + // + // Virtual destructor + // + Ontology::~Ontology( void ) { *************** *** 67,94 **** ; // do nothing } } OntologyRef Ontology::operator=( OntologyCref ) { return ( *this ); } ! bool Ontology::operator==( OntologyCref ) const { ! return true; } void Ontology::addMetaType( MetaTypeCptr aMetaType ) { } ! void Ontology::addAsChild( MetaTypeCptr , MetaTypeCptr ) { ! ; // do nothing } CharCptr Ontology::getDomainName( void ) const { return theDomainName; } } --- 102,413 ---- ; // do nothing } + + // + // Because all the allocations for the meta classes + // are in the class map, we delete only from here + // + + for( ClassMapIterator begin = theClassMap.begin() ; + begin != theClassMap.end(); + ++begin ) + { + delete (*begin).second; + } + + theClassMap.clear(); + theRootMap.clear(); + + theInitializedFlag = false; } + // + // Assignment operator not used + // + OntologyRef Ontology::operator=( OntologyCref ) { return ( *this ); } + + // + // Equality operator not used + // ! bool Ontology::operator==( OntologyCref aRef ) const { ! return ( this == &aRef ); } + // + // Add a new type to the ontology + // + void Ontology::addMetaType( MetaTypeCptr aMetaType ) { + if( aMetaType == NULLPTR ) + { + throw NullPointerException( LOCATION ); + } + else + { + MetaClassPtr aClass( new MetaClass( aMetaType ) ); + theClassMap[aMetaType] = aClass; + this->insertType( aMetaType, aClass ); + } + } + + // + // Add a child reference to a member of this ontology + // + + void Ontology::addAsChild( MetaTypeCptr aParent, MetaClassCptr aChild ) + throw ( NullPointerException ) + { + if( aParent == NULLPTR || aChild == NULLPTR ) + { + throw NullPointerException( LOCATION ); + } + else + { + ClassMapIterator aFItr( theClassMap.find(aParent) ); + if( aFItr != theClassMap.end() ) + { + (*aFItr).second->addComponent( aChild ); + } + else + { + throw NullPointerException( LOCATION ); + } + } } ! // ! // Using the identifier, add a child reference ! // ! ! void Ontology::addAsChild ! ( ! UniversalIdentifierCref aParentId, ! MetaTypeCptr aChild ! ) ! throw ( NullPointerException ) { ! if( aChild == NULLPTR ) ! { ! throw NullPointerException( LOCATION ); ! } ! else ! { ! // ! // Find the parent by identifier ! // ! ! for( ClassMapIterator begin = theClassMap.begin() ; ! begin != theClassMap.end(); ! ++begin ) ! { ! if( (*begin).first->getIdentifier() == aParentId ) ! { ! (*begin).second->addComponent( this->getClass( aChild ) ); ! break; ! } ! else ! { ! ; // need some exception here ! } ! } ! } } + // + // Fetch the domain name + // + CharCptr Ontology::getDomainName( void ) const { return theDomainName; + } + // + // Get the iterator + // + + Iterator<MetaClassCptr> *Ontology::createIterator( void ) + { + return new CoreLinuxAssociativeIterator<ClassMapIterator,MetaTypeCptr,MetaClassCptr> + ( + theClassMap.begin(), + theClassMap.end() + ); + } + + Iterator<MetaClassCptr> *Ontology::createRootIterator( void ) + { + return new CoreLinuxAssociativeIterator<ClassMapIterator,MetaTypeCptr,MetaClassCptr> + ( + theRootMap.begin(), + theRootMap.end() + ); + } + // + // Return the iterator + // + + void Ontology::destroyIterator( Iterator<MetaClassCptr> *anIterator ) + { + delete (CoreLinuxAssociativeIterator<ClassMapIterator,MetaTypeCptr,MetaClassCptr>*)anIterator; + } + + + // + // Prepare for our type hierarchy + // + + void Ontology::seedMetaType( MetaTypeCptr aMetaType ) + { + if( aMetaType == NULLPTR ) + { + throw NullPointerException( LOCATION ); + } + else + { + theClassMap[aMetaType] = new MetaClass( aMetaType ); + } + } + + // + // Initialize the state + // + + void Ontology::initialize( void ) + { + if( this->theInitializedFlag == false ) + { + // + // Iterate through the class map + // + + for( ClassMapIterator begin = theClassMap.begin() ; + begin != theClassMap.end(); + ++begin ) + { + + this->insertType( (*begin).first, (*begin).second ); + } + + } + else + { + ; // do nothing + } + + } + + // + // Used by all to fix the type in the ontology + // + + void Ontology::insertType( MetaTypeCptr aType, MetaClassPtr aClass ) + { + Count parentCount( aType->getParentCount() ); + // + // If the target has no parent (a root) then + // add to the root map + // + + if( parentCount == 0 ) + { + printf("Adding root %s\n",aType->getMetaTypeName() ); + theRootMap[aType] = aClass; + } + + // + // Else, we go through the parents and check each + // for linkages + // + + else + { + Count nonLocal(0); + MetaTypeCptr *parents( aType->getParentTypes() ); + + while( *parents != NULLPTR ) + { + CharCptr aDomainName((*parents)->getDomainName()); + // + // If parent is local to this ontology + // + + if( strcmp(theDomainName,aDomainName) == 0 ) + { + this->addAsChild( *parents, aClass ); + } + + // + // Otherwise, nonlocal and we get the ontology to add + // to from the MetaSpace + // + + else + { + OntologyPtr aOntology( MetaSpace::getOntology( aDomainName ) ); + + if( aOntology != NULLPTR ) + { + aOntology->addAsChild( *parents, aClass ); + } + else + { + throw NullPointerException( LOCATION ); + } + ++nonLocal; + } + ++parents; + } + + // + // If all our parents are non local, then we are a + // root member of this ontology lattice + // + + if( nonLocal == parentCount ) + { + printf("Adding root %s\n",aType->getMetaTypeName() ); + theRootMap[aType] = aClass; + } + else + { + ; // do nothing + } + } + + } + + // + // Extract the class from the appropriate ontology + // + + MetaClassCptr Ontology::getClass( MetaTypeCptr aType ) const + { + MetaClassCptr aClass( NULLPTR ); + + if( strcmp( theDomainName, aType->getDomainName() ) == 0 ) + { + ClassMapConstIterator aFItr( theClassMap.find(aType) ); + if( aFItr != theClassMap.end() ) + { + aClass = (*aFItr).second; + } + else + { + throw NullPointerException( LOCATION ); + } + + } + else + { + OntologyPtr aOntology( MetaSpace::getOntology( aType->getDomainName() ) ); + aClass = aOntology->getClass( aType ); + } + return aClass; } } |
|
From: Frank V. C. <fr...@us...> - 2000-11-15 01:14:36
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv20673/clfw Modified Files: Makefile.am MetaSpace.hpp MetaType.hpp Ontology.hpp Added Files: MetaClass.hpp Log Message: 116737 Ontology ***** Error reading new file: (2, 'No such file or directory') Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** Makefile.am 2000/11/11 17:45:54 1.17 --- Makefile.am 2000/11/15 01:14:31 1.18 *************** *** 32,35 **** --- 32,36 ---- UnsignedShortInteger.hpp \ MetaSpace.hpp \ + MetaClass.hpp \ Ontology.hpp \ Makefile.am Index: MetaSpace.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaSpace.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MetaSpace.hpp 2000/11/12 03:22:06 1.2 --- MetaSpace.hpp 2000/11/15 01:14:31 1.3 *************** *** 53,57 **** */ ! static OntologyPtr getOntology( char *domain = NULLPTR ); /** --- 53,57 ---- */ ! static OntologyPtr getOntology( CharCptr domain = NULLPTR ); /** Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** MetaType.hpp 2000/11/11 17:45:54 1.21 --- MetaType.hpp 2000/11/15 01:14:31 1.22 *************** *** 869,874 **** /** get the instance member descriptors ! @return an array of MemberDescriptors */ --- 869,881 ---- /** + get the parent count + @return Count of parents (0 if root) + */ + + Count getParentCount( void ) const; + + /** get the instance member descriptors ! @return an array of MemberDescriptor structures */ *************** *** 876,883 **** --- 883,905 ---- /** + get the instance member (attributes) count + @return Count of data members + */ + + Count getInstanceMemberCount( void ) const; + + /** get the instance dispatch descriptors + @return an array of DispatchDescriptor structures */ DispatchDescriptorCptr * const getInstanceFunctions( void ) const; + + /** + get the dispatch functions count + @return Count of dispatch functions + */ + + Count getInstanceFunctionCount( void ) const; /** Index: Ontology.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Ontology.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Ontology.hpp 2000/11/12 03:22:06 1.3 --- Ontology.hpp 2000/11/15 01:14:31 1.4 *************** *** 22,31 **** */ namespace corelinux { DECLARE_CLASS( Ontology ); ! /*! ! \class Ontology represents a domain semantic network */ --- 22,52 ---- */ + #if !defined(__CLFWCOMMON_HPP) + #include <ClfwCommon.hpp> + #endif + + #if !defined(__METACLASS_HPP) + #include <MetaClass.hpp> + #endif + + #if !defined(__MAP_HPP) + #include <corelinux/Map.hpp> + #endif + namespace corelinux { + + CORELINUX_MAP + ( + MetaTypeCptr, + MetaClassPtr, + less<MetaTypeCptr>, + ClassMap + ); + DECLARE_CLASS( Ontology ); ! /** ! An Ontology represents a domain semantic network lattice */ *************** *** 33,38 **** --- 54,65 ---- { + friend class MetaSpace; + public: + // + // Constructors and destructors + // + /** Default constructor takes a domain name *************** *** 48,59 **** --- 75,95 ---- virtual ~Ontology( void ); + // + // Operator overloads + // /// Equality operator bool operator==( OntologyCref ) const; + // + // Accessors + // /// gets the domain name CharCptr getDomainName( void ) const; + // + // Mutators + // /** Add a new metatype to this ontology *************** *** 70,81 **** updates the child reference of an existing type - @param MetaType const pointer to add @param MetaType const pointer to add to */ ! virtual void addAsChild( MetaTypeCptr , MetaTypeCptr ); protected: private: --- 106,163 ---- updates the child reference of an existing type @param MetaType const pointer to add to + @param MetaType const pointer to add + */ + + virtual void addAsChild( MetaTypeCptr , MetaClassCptr ) + throw ( NullPointerException ); + + /** + Add a child to a member of the ontology. This + does not store the type being added, but only + updates the child reference of an existing + type + @param UniversalIdentifier const reference to add to + @param MetaType const pointer to add + */ + + virtual void addAsChild( UniversalIdentifierCref , MetaTypeCptr ) + throw ( NullPointerException ); + + // + // Iterator factory methods + // + + /** + Create a iterator over all the entries of the ontology + @return Iterator<MetaClassCptr> pointer + */ + + virtual Iterator<MetaClassCptr> *createIterator( void ); + + /** + Create a iterator over the roots of the ontology + @return Iterator<MetaClassCptr> pointer + */ + + virtual Iterator<MetaClassCptr> *createRootIterator( void ); + + /** + Destroy the iterator + @param Iterator<MetaClassCptr> pointer */ ! virtual void destroyIterator( Iterator<MetaClassCptr> * ); protected: + /** + Gets the class from the local ontology, or where it + exists + @param MetaType const pointer + @return MetaClass const pointer + */ + + MetaClassCptr getClass( MetaTypeCptr ) const; private: *************** *** 92,100 **** OntologyRef operator=( OntologyCref ); private: CharPtr theDomainName; ! }; --- 174,195 ---- OntologyRef operator=( OntologyCref ); + /// Seed the ontology before creating hierarchy + + void seedMetaType( MetaTypeCptr ); + + /// Establish hierarchy + void initialize( void ); + + /// Sets the type in this ontology + + void insertType( MetaTypeCptr, MetaClassPtr ); + private: CharPtr theDomainName; ! bool theInitializedFlag; ! ClassMap theClassMap; ! ClassMap theRootMap; }; |
|
From: Frank V. C. <fr...@us...> - 2000-11-15 01:14:36
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv20673/src/testdrivers/exf1 Modified Files: UserType.cpp examp1.cpp Log Message: 116737 Ontology Index: UserType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/UserType.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** UserType.cpp 2000/11/11 17:45:54 1.2 --- UserType.cpp 2000/11/15 01:14:32 1.3 *************** *** 115,119 **** //! version for the UserType MetaType ! const DwordCref version(1); //! Define the dispatch function with the no return value option --- 115,120 ---- //! version for the UserType MetaType ! const DwordCref version(1); ! const UniversalIdentifier myId; //! Define the dispatch function with the no return value option *************** *** 162,166 **** ( UserType, ! UniversalIdentifier::getZeroUid(), version, "exf1", --- 163,167 ---- ( UserType, ! myId, version, "exf1", Index: examp1.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** examp1.cpp 2000/11/12 03:22:06 1.19 --- examp1.cpp 2000/11/15 01:14:32 1.20 *************** *** 77,80 **** --- 77,88 ---- #endif + #if !defined(__ONTOLOGY_HPP) + #include <clfw/Ontology.hpp> + #endif + + #if !defined(__METACLASS_HPP) + #include <clfw/MetaClass.hpp> + #endif + using namespace corelinux; *************** *** 102,105 **** --- 110,114 ---- void testDispatch( void ); + void dumpOntology( void ); // *************** *** 152,155 **** --- 161,165 ---- testDispatch(); //dumpFundementals(); + dumpOntology(); } *************** *** 227,230 **** --- 237,287 ---- delete aType; delete aValue; + } + + void walkOntology( MetaClassPtr aMetaClass, int indent ) + { + for( int x = 0; x != indent ; ++x ) + { + cout << "\t"; + } + + cout << aMetaClass->getType()->getMetaTypeName() << " (" + << aMetaClass->getType()->getDomainName() << ")" << endl; + + Iterator<MetaClassCptr> *aIterator( aMetaClass->createIterator()); + + while( aIterator->isValid() == true ) + { + walkOntology( (MetaClassPtr)aIterator->getElement(), indent+1 ); + aIterator->setNext(); + } + aMetaClass->destroyIterator( aIterator ); + } + + void dumpOntology( void ) + { + // + // We start by resolving the root of roots :) + // + + Ontology *aOntology( MetaSpace::getOntology("corelinux") ); + + if( aOntology != NULLPTR ) + { + cout << "Have ontology " << aOntology->getDomainName() << endl; + Iterator<MetaClassCptr> *aIterator( aOntology->createRootIterator()); + + while( aIterator->isValid() == true ) + { + walkOntology( (MetaClassPtr)aIterator->getElement(),0 ); + aIterator->setNext(); + } + + aOntology->destroyIterator( aIterator ); + } + else + { + throw NullPointerException( LOCATION ); + } } |
|
From: Hans D. <dul...@us...> - 2000-11-13 20:15:39
|
Update of /cvsroot/corelinux/corelinux/src/classlibs/corelinux In directory slayer.i.sourceforge.net:/tmp/cvs-serv8301 Modified Files: SemaphoreCommon.cpp Log Message: Replaced OFF and ON symbolic value with 0 and 1. Index: SemaphoreCommon.cpp =================================================================== RCS file: /cvsroot/corelinux/corelinux/src/classlibs/corelinux/SemaphoreCommon.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** SemaphoreCommon.cpp 2000/09/09 07:18:33 1.9 --- SemaphoreCommon.cpp 2000/11/13 20:15:36 1.10 *************** *** 139,147 **** // ! if( theBase->creatorId == OFF ) { theBase->creatorId = (Int)aId; ! theBase->currentUsed = OFF; ! theBase->currentGrps = OFF; theOriginator = true; --- 139,147 ---- // ! if( theBase->creatorId == 0 ) { theBase->creatorId = (Int)aId; ! theBase->currentUsed = 0; ! theBase->currentGrps = 0; theOriginator = true; *************** *** 163,167 **** // First entry information ! theBase->currentGrps = ON; aGrpPtr->groupSemCount = theBase->currentUsed = --- 163,167 ---- // First entry information ! theBase->currentGrps = 1; aGrpPtr->groupSemCount = theBase->currentUsed = *************** *** 169,173 **** aGrpPtr->groupInfo = aGid; ! aGrpPtr->groupShares = ON; // Setup the control semaphore --- 169,173 ---- aGrpPtr->groupInfo = aGid; ! aGrpPtr->groupShares = 1; // Setup the control semaphore *************** *** 175,183 **** GETCNTLSEM(aSemPtr,aGrpPtr,aGrpPtr->groupSemCount); ! aSemPtr->maxSemValue = -ON; aSemPtr->isRecursive = OFF; aSemPtr->isBalking = OFF; ! aSemPtr->semShares = ON; ! semctl( aGid, aGrpPtr->groupSemCount-1, SETVAL, ON ); } --- 175,183 ---- GETCNTLSEM(aSemPtr,aGrpPtr,aGrpPtr->groupSemCount); ! aSemPtr->maxSemValue = -1; aSemPtr->isRecursive = OFF; aSemPtr->isBalking = OFF; ! aSemPtr->semShares = 1; ! semctl( aGid, aGrpPtr->groupSemCount-1, SETVAL, 1 ); } *************** *** 194,200 **** theControlGroup = new MutexSemaphoreGroup ( ! OFF, myTokenizer, ! OFF, FAIL_IF_NOTEXISTS ); --- 194,200 ---- theControlGroup = new MutexSemaphoreGroup ( ! 0, myTokenizer, ! 0, FAIL_IF_NOTEXISTS ); *************** *** 204,209 **** // Increment the shares on the control group and control semaphore ! aGrpPtr->groupShares += ON; ! aSemPtr->semShares += ON; } --- 204,209 ---- // Increment the shares on the control group and control semaphore ! aGrpPtr->groupShares += 1; ! aSemPtr->semShares += 1; } *************** *** 245,249 **** CSAGrpHeaderPtr aGrpPtr( (CSAGrpHeaderPtr)theBase ); ++aGrpPtr; ! aGrpPtr->groupShares -= ON; return aGrpPtr->groupShares; } --- 245,249 ---- CSAGrpHeaderPtr aGrpPtr( (CSAGrpHeaderPtr)theBase ); ++aGrpPtr; ! aGrpPtr->groupShares -= 1; return aGrpPtr->groupShares; } *************** *** 285,293 **** // ! if( theBase->currentUsed == OFF ) { ! theBase->currentGrps = ON; aGrpPtr->groupSemCount = theBase->currentUsed = aSemCnt; ! aGrpPtr->groupShares = ON; aGrpPtr->groupInfo = anId; } --- 285,293 ---- // ! if( theBase->currentUsed == 0 ) { ! theBase->currentGrps = 1; aGrpPtr->groupSemCount = theBase->currentUsed = aSemCnt; ! aGrpPtr->groupShares = 1; aGrpPtr->groupInfo = anId; } *************** *** 364,368 **** // ! if( aGrpPtr->groupInfo == OFF ) { // --- 364,368 ---- // ! if( aGrpPtr->groupInfo == 0 ) { // *************** *** 371,375 **** // ! theBase->currentGrps += ON; theBase->currentUsed += aSemCnt; aGrpPtr->groupSemCount = aSemCnt; --- 371,375 ---- // ! theBase->currentGrps += 1; theBase->currentUsed += aSemCnt; aGrpPtr->groupSemCount = aSemCnt; *************** *** 381,388 **** } ! aGroupSem->maxSemValue = -ON; aGroupSem->isRecursive = OFF; aGroupSem->isBalking = OFF; ! semctl( anId, aSemCnt-1, SETVAL, ON ); aGrpPtr->groupInfo = anId; --- 381,388 ---- } ! aGroupSem->maxSemValue = -1; aGroupSem->isRecursive = OFF; aGroupSem->isBalking = OFF; ! semctl( anId, aSemCnt-1, SETVAL, 1 ); aGrpPtr->groupInfo = anId; *************** *** 397,402 **** // ! aGroupSem->semShares += ON; ! aGrpPtr->groupShares += ON; } --- 397,402 ---- // ! aGroupSem->semShares += 1; ! aGrpPtr->groupShares += 1; } *************** *** 436,443 **** // ! if( aGrpPtr->groupShares == ON ) { CSAGrpHeaderPtr aNextGrpPtr( aGrpPtr ); ! aNextGrpPtr += aGrpPtr->groupSemCount + ON; UNLOCKSEM(aGrpPtr->groupInfo,aGrpPtr->groupSemCount,aGroupSem); --- 436,443 ---- // ! if( aGrpPtr->groupShares == 1 ) { CSAGrpHeaderPtr aNextGrpPtr( aGrpPtr ); ! aNextGrpPtr += aGrpPtr->groupSemCount + 1; UNLOCKSEM(aGrpPtr->groupInfo,aGrpPtr->groupSemCount,aGroupSem); *************** *** 445,460 **** // If we are the tail, get rid of us ! if( aNextGrpPtr->groupInfo == OFF ) { theBase->currentUsed -= aGrpPtr->groupSemCount; ! theBase->currentGrps -= ON; ! aGrpPtr->groupInfo = OFF; } else { ! aGrpPtr->groupInfo = -ON; ! aGrpPtr->groupShares = OFF; ! aGrpPtr->groupType = -ON; ! aGroupSem->semShares = OFF; } } --- 445,460 ---- // If we are the tail, get rid of us ! if( aNextGrpPtr->groupInfo == 0 ) { theBase->currentUsed -= aGrpPtr->groupSemCount; ! theBase->currentGrps -= 1; ! aGrpPtr->groupInfo = 0; } else { ! aGrpPtr->groupInfo = -1; ! aGrpPtr->groupShares = 0; ! aGrpPtr->groupType = -1; ! aGroupSem->semShares = 0; } } *************** *** 463,468 **** else { ! aGrpPtr->groupShares -= ON; ! aGroupSem->semShares -= ON; results = aGrpPtr->groupShares; UNLOCKSEM(aGrpPtr->groupInfo,aGrpPtr->groupSemCount,aGroupSem); --- 463,468 ---- else { ! aGrpPtr->groupShares -= 1; ! aGroupSem->semShares -= 1; results = aGrpPtr->groupShares; UNLOCKSEM(aGrpPtr->groupInfo,aGrpPtr->groupSemCount,aGroupSem); *************** *** 517,525 **** if( aSemIndex < realCnt ) { ! GETCNTLSEM(aCandidateSem,aGrpPtr,aSemIndex+ON); // If the candidate is available ! if( aCandidateSem->semShares == OFF ) { // If it should have been in existence --- 517,525 ---- if( aSemIndex < realCnt ) { ! GETCNTLSEM(aCandidateSem,aGrpPtr,aSemIndex+1); // If the candidate is available ! if( aCandidateSem->semShares == 0 ) { // If it should have been in existence *************** *** 534,538 **** else { ! aCandidateSem->semShares = ON; aCandidateSem->maxSemValue = aMaxValue; aCandidateSem->isRecursive = aRecurse; --- 534,538 ---- else { ! aCandidateSem->semShares = 1; aCandidateSem->maxSemValue = aMaxValue; aCandidateSem->isRecursive = aRecurse; *************** *** 550,554 **** else { ! aCandidateSem->semShares += ON; aRecurse = aCandidateSem->isRecursive; aBalking = aCandidateSem->isBalking; --- 550,554 ---- else { ! aCandidateSem->semShares += 1; aRecurse = aCandidateSem->isRecursive; aBalking = aCandidateSem->isBalking; *************** *** 574,583 **** for( Int x=0; x < realCnt; ++x ) { ! GETCNTLSEM(aCandidateSem,aGrpPtr,x+ON); ! if( aCandidateSem->semShares == OFF ) { results = x; ! aCandidateSem->semShares = ON; aCandidateSem->maxSemValue = aMaxValue; aCandidateSem->isRecursive = aRecurse; --- 574,583 ---- for( Int x=0; x < realCnt; ++x ) { ! GETCNTLSEM(aCandidateSem,aGrpPtr,x+1); ! if( aCandidateSem->semShares == 0 ) { results = x; ! aCandidateSem->semShares = 1; aCandidateSem->maxSemValue = aMaxValue; aCandidateSem->isRecursive = aRecurse; *************** *** 615,619 **** LOCKSEM(aGrpPtr->groupInfo,aGrpPtr->groupSemCount,aGroupSem); ! Int results(OFF); Int realCnt(aGrpPtr->groupSemCount-1); --- 615,619 ---- LOCKSEM(aGrpPtr->groupInfo,aGrpPtr->groupSemCount,aGroupSem); ! Int results(0); Int realCnt(aGrpPtr->groupSemCount-1); *************** *** 621,632 **** { CSASemHeaderPtr aCandidateSem( NULLPTR ); ! GETCNTLSEM(aCandidateSem,aGrpPtr,aSemIndex+ON); ! if( aCandidateSem->semShares > OFF ) { ! aCandidateSem->semShares -= ON; results = aCandidateSem->semShares; if( results == 0 ) { ! aCandidateSem->maxSemValue = OFF; aCandidateSem->isRecursive = OFF; aCandidateSem->isBalking = OFF; --- 621,632 ---- { CSASemHeaderPtr aCandidateSem( NULLPTR ); ! GETCNTLSEM(aCandidateSem,aGrpPtr,aSemIndex+1); ! if( aCandidateSem->semShares > 0 ) { ! aCandidateSem->semShares -= 1; results = aCandidateSem->semShares; if( results == 0 ) { ! aCandidateSem->maxSemValue = 0; aCandidateSem->isRecursive = OFF; aCandidateSem->isBalking = OFF; *************** *** 672,676 **** else { ! aHead += (aHead->groupSemCount+ON); } } --- 672,676 ---- else { ! aHead += (aHead->groupSemCount+1); } } *************** *** 699,707 **** else { ! aHead += (aHead->groupSemCount+ON); } } ! if( aGrpPtr == NULLPTR && aHead->groupInfo == OFF ) { Int testVal --- 699,707 ---- else { ! aHead += (aHead->groupSemCount+1); } } ! if( aGrpPtr == NULLPTR && aHead->groupInfo == 0 ) { Int testVal *************** *** 710,714 **** theBase->currentUsed + theBase->currentGrps + ! ON ); --- 710,714 ---- theBase->currentUsed + theBase->currentGrps + ! 1 ); *************** *** 747,751 **** for( Int x = 0; x < aMax && aGrp == NULLPTR; ++x ) { ! if( aCntrlGroup->groupInfo == -ON ) { if( aCntrlGroup->groupSemCount > aCountNeeded ) --- 747,751 ---- for( Int x = 0; x < aMax && aGrp == NULLPTR; ++x ) { ! if( aCntrlGroup->groupInfo == -1 ) { if( aCntrlGroup->groupSemCount > aCountNeeded ) *************** *** 754,764 **** aGrp = aCntrlGroup; ! aCntrlGroup += aCountNeeded+ON; // Set new group marker ! aCntrlGroup->groupInfo = -ON; aCntrlGroup->groupSemCount = ! (aGrp->groupSemCount - (aCountNeeded+ON)); aGrp->groupSemCount = aCountNeeded; --- 754,764 ---- aGrp = aCntrlGroup; ! aCntrlGroup += aCountNeeded+1; // Set new group marker ! aCntrlGroup->groupInfo = -1; aCntrlGroup->groupSemCount = ! (aGrp->groupSemCount - (aCountNeeded+1)); aGrp->groupSemCount = aCountNeeded; *************** *** 768,773 **** // increased the group count ! theBase->currentUsed -= ON; ! theBase->currentGrps += ON; } else --- 768,773 ---- // increased the group count ! theBase->currentUsed -= 1; ! theBase->currentGrps += 1; } else *************** *** 781,785 **** } ! aCntrlGroup += aCntrlGroup->groupSemCount+ON; } --- 781,785 ---- } ! aCntrlGroup += aCntrlGroup->groupSemCount+1; } *************** *** 803,807 **** for( Int x = 0; x < aMax; ) { ! if( aCntrlGroup->groupInfo == -ON ) { // If we have not begun --- 803,807 ---- for( Int x = 0; x < aMax; ) { ! if( aCntrlGroup->groupInfo == -1 ) { // If we have not begun *************** *** 818,831 **** { aGrpBegin->groupSemCount += ! (aCntrlGroup->groupSemCount + ON); // Emulate a dead semaphore aCntrlGroup->groupInfo = ! aCntrlGroup->groupShares = aCntrlGroup->groupSemCount = OFF; --aMax; ! theBase->currentGrps -= ON; ! theBase->currentUsed += ON; aCntrlGroup = aGrpBegin; } --- 818,831 ---- { aGrpBegin->groupSemCount += ! (aCntrlGroup->groupSemCount + 1); // Emulate a dead semaphore aCntrlGroup->groupInfo = ! aCntrlGroup->groupShares = aCntrlGroup->groupSemCount = 0; --aMax; ! theBase->currentGrps -= 1; ! theBase->currentUsed += 1; aCntrlGroup = aGrpBegin; } *************** *** 836,840 **** ++x; } ! aCntrlGroup += aCntrlGroup->groupSemCount+ON; } --- 836,840 ---- ++x; } ! aCntrlGroup += aCntrlGroup->groupSemCount+1; } *************** *** 912,921 **** REQUIRE( aGroup != NULLPTR ); ! Int results(OFF); ! struct sembuf aSemBuf={ aSid, -ON, aFlg}; if( aGroup->isPrivate() == true ) { ! results = semop( aGid, &aSemBuf, ON ); } else --- 912,921 ---- REQUIRE( aGroup != NULLPTR ); ! Int results(0); ! struct sembuf aSemBuf={ aSid, -1, aFlg}; if( aGroup->isPrivate() == true ) { ! results = semop( aGid, &aSemBuf, 1 ); } else *************** *** 924,930 **** CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSid+ON); ! results = semop( aGid, &aSemBuf, ON ); aGroupSem->semOwner = --- 924,930 ---- CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSid+1); ! results = semop( aGid, &aSemBuf, 1 ); aGroupSem->semOwner = *************** *** 951,959 **** Int results(0); ! struct sembuf aSemBuf={ aSid, ON, aFlg}; if( aGroup->isPrivate() == true ) { ! results = semop( aGid, &aSemBuf, ON ); } else --- 951,959 ---- Int results(0); ! struct sembuf aSemBuf={ aSid, 1, aFlg}; if( aGroup->isPrivate() == true ) { ! results = semop( aGid, &aSemBuf, 1 ); } else *************** *** 962,971 **** CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSid+ON); ! results = semop( aGid, &aSemBuf, ON ); aGroupSem->semOwner = ! (!results ? (Int) OFF : aGroupSem->semOwner); } return results; --- 962,971 ---- CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSid+1); ! results = semop( aGid, &aSemBuf, 1 ); aGroupSem->semOwner = ! (!results ? (Int) 0 : aGroupSem->semOwner); } return results; *************** *** 991,995 **** if( aGroup->isPrivate() == true ) { ! results = semop( aGid, &aSemBuf, ON ); } else --- 991,995 ---- if( aGroup->isPrivate() == true ) { ! results = semop( aGid, &aSemBuf, 1 ); } else *************** *** 998,1007 **** CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSid+ON); ! results = semop( aGid, &aSemBuf, ON ); aGroupSem->semOwner = ! (!results ? (Int) OFF : aGroupSem->semOwner); } return results; --- 998,1007 ---- CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSid+1); ! results = semop( aGid, &aSemBuf, 1 ); aGroupSem->semOwner = ! (!results ? (Int) 0 : aGroupSem->semOwner); } return results; *************** *** 1025,1033 **** REQUIRE( aGroup != NULLPTR ); ! Int results(OFF); if( aGroup->isPrivate() == true ) { ! results = -ON; } else --- 1025,1033 ---- REQUIRE( aGroup != NULLPTR ); ! Int results(0); if( aGroup->isPrivate() == true ) { ! results = -1; } else *************** *** 1057,1061 **** ) { ! Int results(OFF); if( aGroup->isPrivate() == true ) { --- 1057,1061 ---- ) { ! Int results(0); if( aGroup->isPrivate() == true ) { *************** *** 1118,1122 **** CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSemId+ON); results = aGroupSem->maxSemValue; --- 1118,1122 ---- CSASemHeaderPtr aGroupSem( NULLPTR ); ! GETCNTLSEM(aGroupSem,aGrpPtr,aSemId+1); results = aGroupSem->maxSemValue; |
|
From: Hans D. <dul...@us...> - 2000-11-13 15:38:02
|
Update of /cvsroot/corelinux/corelinux/corelinux In directory slayer.i.sourceforge.net:/tmp/cvs-serv4755 Modified Files: EventSemaphoreGroup.hpp Log Message: Modified comments to Doxygen enabled ones. Index: EventSemaphoreGroup.hpp =================================================================== RCS file: /cvsroot/corelinux/corelinux/corelinux/EventSemaphoreGroup.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** EventSemaphoreGroup.hpp 2000/09/23 04:45:24 1.5 --- EventSemaphoreGroup.hpp 2000/11/13 15:20:25 1.6 *************** *** 73,81 **** @param dist indicates how to treat the conditions that the group may meet in the request: ! CREATE_OR_REUSE indicates that the caller doesn't care ! FAIL_IF_EXISTS indicates the attempt was for a create ! FAIL_IF_NOTEXISTS indicates the attempt was for a open @exception Assertion if aCount < 1 --- 73,81 ---- @param dist indicates how to treat the conditions that the group may meet in the request: ! @arg CREATE_OR_REUSE indicates that the caller doesn't care ! @arg FAIL_IF_EXISTS indicates the attempt was for a create ! @arg FAIL_IF_NOTEXISTS indicates the attempt was for a open @exception Assertion if aCount < 1 *************** *** 101,109 **** @param disp indicates how to treat the conditions that the group may meet in the request: ! CREATE_OR_REUSE indicates that the caller doesn't care ! FAIL_IF_EXISTS indicates the attempt was for a create ! FAIL_IF_NOTEXISTS indicates the attempt was for a open @exception Assertion if aCount < 1 or aCount > system --- 101,109 ---- @param disp indicates how to treat the conditions that the group may meet in the request: ! @arg CREATE_OR_REUSE indicates that the caller doesn't care ! @arg FAIL_IF_EXISTS indicates the attempt was for a create ! @arg FAIL_IF_NOTEXISTS indicates the attempt was for a open @exception Assertion if aCount < 1 or aCount > system *************** *** 161,169 **** @param disp indicates how to treat the conditions that the group may meet in the request: ! CREATE_OR_REUSE indicates that the caller doesn't care ! FAIL_IF_EXISTS indicates the attempt was for a create ! FAIL_IF_NOTEXISTS indicates the attempt was for a open @param Recursive to allow same thread multiple locks --- 161,169 ---- @param disp indicates how to treat the conditions that the group may meet in the request: ! @arg CREATE_OR_REUSE indicates that the caller doesn't care ! @arg FAIL_IF_EXISTS indicates the attempt was for a create ! @arg FAIL_IF_NOTEXISTS indicates the attempt was for a open @param Recursive to allow same thread multiple locks *************** *** 196,204 **** @param disp indicates how to treat the conditions that the group may meet in the request: ! CREATE_OR_REUSE indicates that the caller doesn't care ! FAIL_IF_EXISTS indicates the attempt was for a create ! FAIL_IF_NOTEXISTS indicates the attempt was for a open @param Recursive to allow same thread multiple locks --- 196,204 ---- @param disp indicates how to treat the conditions that the group may meet in the request: ! @arg CREATE_OR_REUSE indicates that the caller doesn't care ! @arg FAIL_IF_EXISTS indicates the attempt was for a create ! @arg FAIL_IF_NOTEXISTS indicates the attempt was for a open @param Recursive to allow same thread multiple locks *************** *** 227,237 **** @param disp indicates how to treat the conditions that the group may meet in the request: ! CREATE_OR_REUSE indicates that the caller doesn't care ! FAIL_IF_EXISTS indicates the attempt was for a create ! FAIL_IF_NOTEXISTS indicates the attempt was for a ! open @param Recursive to allow same thread multiple ! locks @param Recursive to allow same thread multiple locks @param Balking to allow the semaphore to balk --- 227,236 ---- @param disp indicates how to treat the conditions that the group may meet in the request: ! @arg CREATE_OR_REUSE indicates that the caller doesn't care ! @arg FAIL_IF_EXISTS indicates the attempt was for a create ! @arg FAIL_IF_NOTEXISTS indicates the attempt was for a ! open @param Recursive to allow same thread multiple locks @param Balking to allow the semaphore to balk *************** *** 259,267 **** @param disp indicates how to treat the conditions that the group may meet in the request: ! CREATE_OR_REUSE indicates that the caller doesn't care ! FAIL_IF_EXISTS indicates the attempt was for a create ! FAIL_IF_NOTEXISTS indicates the attempt was for a open @param Recursive to allow same thread multiple locks --- 258,266 ---- @param disp indicates how to treat the conditions that the group may meet in the request: ! @arg CREATE_OR_REUSE indicates that the caller doesn't care ! @arg FAIL_IF_EXISTS indicates the attempt was for a create ! @arg FAIL_IF_NOTEXISTS indicates the attempt was for a open @param Recursive to allow same thread multiple locks |
|
From: Frank V. C. <fr...@us...> - 2000-11-12 03:22:09
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv25497/src/libs/clfw Modified Files: MetaSpace.cpp Ontology.cpp Log Message: 116737 Ontology work Index: MetaSpace.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaSpace.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MetaSpace.cpp 2000/11/11 17:45:54 1.1 --- MetaSpace.cpp 2000/11/12 03:22:06 1.2 *************** *** 32,37 **** --- 32,65 ---- #endif + #if !defined(__MAP_HPP) + #include <corelinux/Map.hpp> + #endif + + #include <cstring> + namespace corelinux { + struct _MetaSpaceLink + { + void *data; + void *next; + }; + + DECLARE_TYPE( struct _MetaSpaceLink, MetaSpaceLink ); + + struct KeyComp + { + bool operator()(CharCptr s1, CharCptr s2) const + { + return strcmp(s1, s2) < 0; + } + }; + + + CORELINUX_MAP( CharCptr, OntologyPtr, KeyComp, OntologyMap ); + + VoidPtr MetaSpace::theHead( NULLPTR ); + bool MetaSpace::theInitializedFlag( false ); + CharCptr MetaSpace::theDefaultDomain( "corelinux" ); // // Never used, private *************** *** 82,86 **** void MetaSpace::storeType( MetaTypeCptr aMetaType ) { ! ; } --- 110,137 ---- void MetaSpace::storeType( MetaTypeCptr aMetaType ) { ! if( MetaSpace::theInitializedFlag == false ) ! { ! MetaSpaceLinkPtr aLink = new MetaSpaceLink; ! aLink->data = (VoidPtr )aMetaType; ! ! if( MetaSpace::theHead == NULLPTR ) ! { ! aLink->next = NULLPTR; ! } ! else ! { ! aLink->next = MetaSpace::theHead; ! } ! ! MetaSpace::theHead = (VoidPtr) aLink; ! } ! else ! { ! // ! // Because we are initialized, either ! // this type has a domain waiting for it, ! // or we need to create one. ! // ! } } *************** *** 89,98 **** // ! bool MetaSpace::initialize( void ) { ! bool isInitialized( false ); ! return isInitialized; } - } --- 140,209 ---- // ! void MetaSpace::initialize( void ) { ! if( MetaSpace::theInitializedFlag == false ) ! { ! MetaSpace::theInitializedFlag = true; ! ! OntologyMapPtr theMap = new OntologyMap; ! ! MetaSpaceLinkPtr aLink = (MetaSpaceLinkPtr)MetaSpace::theHead; ! ! // ! // For each link, get the domain name and if there is no ontology ! // then create, then add the node to the ontology ! // ! ! OntologyPtr aOntology( NULLPTR ); ! OntologyMapIterator aFItr; ! ! while( aLink != NULLPTR ) ! { ! MetaTypeCptr aMT = ( MetaTypeCptr ) aLink->data; ! ! aFItr = theMap->find(aMT->getDomainName()); ! ! if( aFItr == theMap->end() ) ! { ! OntologyPtr aOntology = new Ontology( aMT->getDomainName() ); ! (*theMap)[aOntology->getDomainName()] = aOntology; ! } ! else ! { ! aOntology = (*aFItr).second; ! } ! ! aOntology->addMetaType( aMT ); ! MetaSpaceLinkPtr aTmp = aLink; ! aLink = (MetaSpaceLinkPtr)aLink->next; ! delete aTmp; ! } ! ! // ! // Now go and initialize the corelinux first before the others ! // ! ! aFItr = theMap->find(MetaSpace::theDefaultDomain); ! if( aFItr != theMap->end() ) ! { ! ! } ! else ! { ! throw NullPointerException(LOCATION); ! } ! ! aFItr = theMap->begin(); ! while( aFItr != theMap->end() ) ! { ! ! } ! ! } ! else ! { ! ; // do nothing, already initialized ! } } } Index: Ontology.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Ontology.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Ontology.cpp 2000/11/11 17:45:54 1.2 --- Ontology.cpp 2000/11/12 03:22:06 1.3 *************** *** 79,83 **** } ! void Ontology::addType( MetaTypeCptr aMetaType ) { } --- 79,83 ---- } ! void Ontology::addMetaType( MetaTypeCptr aMetaType ) { } *************** *** 86,89 **** --- 86,94 ---- { ; // do nothing + } + + CharCptr Ontology::getDomainName( void ) const + { + return theDomainName; } } |
|
From: Frank V. C. <fr...@us...> - 2000-11-12 03:22:09
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv25497/src/testdrivers/exf1 Modified Files: examp1.cpp Log Message: 116737 Ontology work Index: examp1.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** examp1.cpp 2000/11/11 17:45:54 1.18 --- examp1.cpp 2000/11/12 03:22:06 1.19 *************** *** 73,76 **** --- 73,80 ---- #endif + #if !defined(__METASPACE_HPP) + #include <clfw/MetaSpace.hpp> + #endif + using namespace corelinux; *************** *** 145,148 **** --- 149,153 ---- try { + MetaSpace::initialize(); testDispatch(); //dumpFundementals(); |
|
From: Frank V. C. <fr...@us...> - 2000-11-12 03:22:09
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv25497/clfw Modified Files: MetaSpace.hpp Ontology.hpp Log Message: 116737 Ontology work Index: MetaSpace.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaSpace.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MetaSpace.hpp 2000/11/11 17:45:54 1.1 --- MetaSpace.hpp 2000/11/12 03:22:06 1.2 *************** *** 58,65 **** Initialize the MetaSpace, creating namespace hierarchies as necessary - @returns false if already initialized */ ! static bool initialize( void ); protected: --- 58,64 ---- Initialize the MetaSpace, creating namespace hierarchies as necessary */ ! static void initialize( void ); protected: *************** *** 79,82 **** --- 78,85 ---- private: + + static VoidPtr theHead; + static bool theInitializedFlag; + static CharCptr theDefaultDomain; Index: Ontology.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Ontology.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Ontology.hpp 2000/11/11 17:45:54 1.2 --- Ontology.hpp 2000/11/12 03:22:06 1.3 *************** *** 63,67 **** */ ! virtual void addType( MetaTypeCptr ); /** --- 63,67 ---- */ ! virtual void addMetaType( MetaTypeCptr ); /** |
|
From: Frank V. C. <fr...@us...> - 2000-11-11 17:45:57
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv30674/src/libs/clfw Modified Files: Aggregate.cpp Boolean.cpp FrameworkEntity.cpp Integer.cpp Makefile.am MetaType.cpp Number.cpp Ontology.cpp RealNumber.cpp ShortInteger.cpp SignedNumber.cpp UnsignedInteger.cpp UnsignedNumber.cpp UnsignedShortInteger.cpp Added Files: MetaSpace.cpp Log Message: 116737 Ontology Support ***** Error reading new file: (2, 'No such file or directory') Index: Aggregate.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Aggregate.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Aggregate.cpp 2000/10/29 17:09:52 1.2 --- Aggregate.cpp 2000/11/11 17:45:54 1.3 *************** *** 58,62 **** //! we use the abstract macro for MetaTypeAggregate autonaming ! DEFINE_ABSTRACT_METATYPE( Aggregate, metaIdentifier, version ); // --- 58,69 ---- //! we use the abstract macro for MetaTypeAggregate autonaming ! DEFINE_ABSTRACT_METATYPE ! ( ! Aggregate, ! metaIdentifier, ! version , ! NULLPTR, ! "Base Abstract Prototype" ! ); // Index: Boolean.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Boolean.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Boolean.cpp 2000/10/29 17:09:52 1.3 --- Boolean.cpp 2000/11/11 17:45:54 1.4 *************** *** 63,67 **** //! we use the standard macro for MetaTypeBoolean autonaming ! DEFINE_METATYPE( Boolean, metaIdentifier, version ); // --- 63,74 ---- //! we use the standard macro for MetaTypeBoolean autonaming ! DEFINE_METATYPE ! ( ! Boolean, ! metaIdentifier, ! version , ! NULLPTR, ! "Simple Boolean with value true or false" ! ); // Index: FrameworkEntity.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/FrameworkEntity.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** FrameworkEntity.cpp 2000/10/29 17:09:52 1.7 --- FrameworkEntity.cpp 2000/11/11 17:45:54 1.8 *************** *** 56,60 **** //! because we must define MetaTypeRoot and is abstract ! DEFINE_ABSTRACT_METATYPE1( FrameworkEntity, MetaTypeRoot, metaIdentifier, version ); // --- 56,67 ---- //! because we must define MetaTypeRoot and is abstract ! DEFINE_ABSTRACT_METATYPE1 ! ( ! FrameworkEntity, ! MetaTypeRoot, ! metaIdentifier, ! version, ! NULLPTR, ! "Base Abstract Type"); // Index: Integer.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Integer.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Integer.cpp 2000/10/29 17:09:52 1.5 --- Integer.cpp 2000/11/11 17:45:54 1.6 *************** *** 68,72 **** //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE( Integer, metaIdentifier, version ); // --- 68,79 ---- //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE ! ( ! Integer, ! metaIdentifier, ! version , ! NULLPTR, ! "Wrapper for integral type or int" ! ); // Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** Makefile.am 2000/11/10 04:42:48 1.14 --- Makefile.am 2000/11/11 17:45:54 1.15 *************** *** 29,32 **** --- 29,33 ---- ShortInteger.cpp \ UnsignedInteger.cpp \ + MetaSpace.cpp \ Ontology.cpp \ UnsignedShortInteger.cpp Index: MetaType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaType.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** MetaType.cpp 2000/11/10 04:42:48 1.13 --- MetaType.cpp 2000/11/11 17:45:54 1.14 *************** *** 34,39 **** #endif ! #if !defined(__ONTOLOGY_HPP) ! #include <Ontology.hpp> #endif --- 34,39 ---- #endif ! #if !defined(__METASPACE_HPP) ! #include <MetaSpace.hpp> #endif *************** *** 44,47 **** --- 44,49 ---- namespace corelinux { + CharCptr MetaType::theDefaultDomainName = "corelinux"; + // // Abstract metaclass constructor *************** *** 56,59 **** --- 58,63 ---- MemberDescriptorCptr *aMemberArray, DispatchDescriptorCptr *aDispatchArray, + CharCptr aDomainName, + CharCptr aDescription, CharCptr aTypeName, CharCptr aMetaTypeName *************** *** 66,74 **** theInstanceMembers( aMemberArray ), theDispatchFunctions( aDispatchArray ), theInstanceTypeName( aTypeName ), theMetaTypeName( aMetaTypeName ), theFactoryAllocator( NULLPTR ) { ! Ontology::addType( this ); } --- 70,80 ---- theInstanceMembers( aMemberArray ), theDispatchFunctions( aDispatchArray ), + theDomainName( (aDomainName != NULLPTR ? aDomainName : MetaType::theDefaultDomainName) ), + theTypeDescription( aDescription ), theInstanceTypeName( aTypeName ), theMetaTypeName( aMetaTypeName ), theFactoryAllocator( NULLPTR ) { ! MetaSpace::storeType( this ); } *************** *** 85,88 **** --- 91,96 ---- MemberDescriptorCptr *aMemberArray, DispatchDescriptorCptr *aDispatchArray, + CharCptr aDomainName, + CharCptr aDescription, CharCptr aTypeName, CharCptr aMetaTypeName, *************** *** 96,104 **** theInstanceMembers( aMemberArray ), theDispatchFunctions( aDispatchArray ), theInstanceTypeName( aTypeName ), theMetaTypeName( aMetaTypeName ), theFactoryAllocator( aAllocation ) { ! Ontology::addType( this ); } --- 104,114 ---- theInstanceMembers( aMemberArray ), theDispatchFunctions( aDispatchArray ), + theDomainName( (aDomainName != NULLPTR ? aDomainName : MetaType::theDefaultDomainName) ), + theTypeDescription( aDescription ), theInstanceTypeName( aTypeName ), theMetaTypeName( aMetaTypeName ), theFactoryAllocator( aAllocation ) { ! MetaSpace::storeType( this ); } *************** *** 178,181 **** --- 188,205 ---- { return theDispatchFunctions; + } + + // Gets the domain (namespace) name + + CharCptr MetaType::getDomainName( void ) const + { + return theDomainName; + } + + // Get the description of the type + + CharCptr MetaType::getTypeDescription( void ) const + { + return theTypeDescription; } Index: Number.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Number.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Number.cpp 2000/10/29 17:09:52 1.5 --- Number.cpp 2000/11/11 17:45:54 1.6 *************** *** 58,62 **** //! we use the abstract macro for MetaTypeNumber autonaming ! DEFINE_ABSTRACT_METATYPE( Number, metaIdentifier, version ); // --- 58,69 ---- //! we use the abstract macro for MetaTypeNumber autonaming ! DEFINE_ABSTRACT_METATYPE ! ( ! Number, ! metaIdentifier, ! version , ! NULLPTR, ! "Base abstract numeric type" ! ); // Index: Ontology.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Ontology.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Ontology.cpp 2000/11/10 04:42:48 1.1 --- Ontology.cpp 2000/11/11 17:45:54 1.2 *************** *** 27,37 **** #endif ! extern "C" ! { ! #include <stdio.h> ! } namespace corelinux { Ontology::Ontology( void ) { --- 27,50 ---- #endif ! #include <cstring> namespace corelinux { + + Ontology::Ontology( CharCptr aDomain ) + : + theDomainName( NULLPTR ) + { + if( aDomain == NULLPTR || (*aDomain == Char( 0 )) ) + { + throw NullPointerException(LOCATION); + } + else + { + theDomainName = new Char[ strlen( aDomain )+1 ]; + strcpy( theDomainName, aDomain ); + } + } + Ontology::Ontology( void ) { *************** *** 44,47 **** --- 57,72 ---- } + Ontology::~Ontology( void ) + { + if( theDomainName != NULLPTR ) + { + delete [] theDomainName; + } + else + { + ; // do nothing + } + } + OntologyRef Ontology::operator=( OntologyCref ) { *************** *** 56,63 **** void Ontology::addType( MetaTypeCptr aMetaType ) { - printf("Have a type %s\n",aMetaType->getMetaTypeName()); - } - } --- 81,97 ---- void Ontology::addType( MetaTypeCptr aMetaType ) { } + void Ontology::addAsChild( MetaTypeCptr , MetaTypeCptr ) + { + ; // do nothing + } } + /* + Common rcs information do not modify + $Author$ + $Revision$ + $Date$ + $Locker$ + */ + Index: RealNumber.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/RealNumber.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** RealNumber.cpp 2000/10/29 17:09:52 1.2 --- RealNumber.cpp 2000/11/11 17:45:54 1.3 *************** *** 63,67 **** //! we use the standard macro for MetaTypeRealNumber autonaming ! DEFINE_METATYPE( RealNumber, metaIdentifier, version ); // --- 63,74 ---- //! we use the standard macro for MetaTypeRealNumber autonaming ! DEFINE_METATYPE ! ( ! RealNumber, ! metaIdentifier, ! version , ! NULLPTR, ! "Real number type" ! ); // Index: ShortInteger.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/ShortInteger.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ShortInteger.cpp 2000/10/29 17:09:52 1.4 --- ShortInteger.cpp 2000/11/11 17:45:54 1.5 *************** *** 67,71 **** //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE( ShortInteger, metaIdentifier, version ); // --- 67,78 ---- //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE ! ( ! ShortInteger, ! metaIdentifier, ! version , ! NULLPTR, ! "Wrapper for signed short integral type or short int" ! ); // Index: SignedNumber.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/SignedNumber.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** SignedNumber.cpp 2000/10/29 17:09:52 1.2 --- SignedNumber.cpp 2000/11/11 17:45:54 1.3 *************** *** 62,66 **** //! we use the standard macro for MetaTypeSignedNumber autonaming ! DEFINE_ABSTRACT_METATYPE( SignedNumber, metaIdentifier, version ); // --- 62,73 ---- //! we use the standard macro for MetaTypeSignedNumber autonaming ! DEFINE_ABSTRACT_METATYPE ! ( ! SignedNumber, ! metaIdentifier, ! version , ! NULLPTR, ! "Base abstract signed integral number type" ! ); // Index: UnsignedInteger.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/UnsignedInteger.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** UnsignedInteger.cpp 2000/10/29 17:09:52 1.4 --- UnsignedInteger.cpp 2000/11/11 17:45:54 1.5 *************** *** 68,72 **** //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE( UnsignedInteger, metaIdentifier, version ); // --- 68,79 ---- //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE ! ( ! UnsignedInteger, ! metaIdentifier, ! version , ! NULLPTR, ! "Wrapper for unsigned integral type or unsigned int" ! ); // Index: UnsignedNumber.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/UnsignedNumber.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** UnsignedNumber.cpp 2000/10/29 17:09:52 1.2 --- UnsignedNumber.cpp 2000/11/11 17:45:54 1.3 *************** *** 62,66 **** //! we use the standard macro for MetaTypeUnsignedNumber autonaming ! DEFINE_ABSTRACT_METATYPE( UnsignedNumber, metaIdentifier, version ); // --- 62,73 ---- //! we use the standard macro for MetaTypeUnsignedNumber autonaming ! DEFINE_ABSTRACT_METATYPE ! ( ! UnsignedNumber, ! metaIdentifier, ! version , ! NULLPTR, ! "Base abstract unsigned integral number type" ! ); // Index: UnsignedShortInteger.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/UnsignedShortInteger.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** UnsignedShortInteger.cpp 2000/10/29 17:09:52 1.3 --- UnsignedShortInteger.cpp 2000/11/11 17:45:54 1.4 *************** *** 67,71 **** //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE( UnsignedShortInteger, metaIdentifier, version ); // --- 67,78 ---- //! we use the standard macro for MetaTypeInteger autonaming ! DEFINE_METATYPE ! ( ! UnsignedShortInteger, ! metaIdentifier, ! version , ! NULLPTR, ! "Wrapper for unsigned short integral type or unsigned short int" ! ); // |
|
From: Frank V. C. <fr...@us...> - 2000-11-11 17:45:57
|
Update of /cvsroot/corelinux/clfw/src/libs/LibLoad In directory slayer.i.sourceforge.net:/tmp/cvs-serv30674/src/libs/LibLoad Modified Files: LibraryObjectDefinition.cpp LibraryType.cpp Log Message: 116737 Ontology Support Index: LibraryObjectDefinition.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/LibLoad/LibraryObjectDefinition.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** LibraryObjectDefinition.cpp 2000/10/29 17:09:52 1.3 --- LibraryObjectDefinition.cpp 2000/11/11 17:45:54 1.4 *************** *** 67,71 **** //! we use the abstract macro for MetaTypeAggregate autonaming ! DEFINE_ABSTRACT_METATYPE( LibraryObjectDefinition, metaIdentifier, version ); // --- 67,78 ---- //! 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.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** LibraryType.cpp 2000/10/29 17:09:52 1.5 --- LibraryType.cpp 2000/11/11 17:45:54 1.6 *************** *** 67,71 **** //! we use the abstract macro for MetaTypeAggregate autonaming ! DEFINE_METATYPE( LibraryType, metaIdentifier, version ); // --- 67,78 ---- //! we use the abstract macro for MetaTypeAggregate autonaming ! DEFINE_METATYPE ! ( ! LibraryType, ! metaIdentifier, ! version, ! NULLPTR , ! "Aggregate type that describes computer library types" ! ); // |
|
From: Frank V. C. <fr...@us...> - 2000-11-11 17:45:57
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1 In directory slayer.i.sourceforge.net:/tmp/cvs-serv30674/src/testdrivers/exf1 Modified Files: UserType.cpp examp1.cpp Log Message: 116737 Ontology Support Index: UserType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/UserType.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** UserType.cpp 2000/10/30 05:01:26 1.1 --- UserType.cpp 2000/11/11 17:45:54 1.2 *************** *** 159,163 **** // use the ZeroUid for a transient identifier ! DEFINE_METATYPE( UserType, UniversalIdentifier::getZeroUid(), version ); /* --- 159,170 ---- // use the ZeroUid for a transient identifier ! DEFINE_METATYPE ! ( ! UserType, ! UniversalIdentifier::getZeroUid(), ! version, ! "exf1", ! "Example type that does nothing" ! ); /* Index: examp1.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** examp1.cpp 2000/10/30 05:01:26 1.17 --- examp1.cpp 2000/11/11 17:45:54 1.18 *************** *** 319,323 **** cout << endl << "Analyzing class [" << aMTPtr->getInstanceTypeName() ! << "] MetaType [" << aMTPtr->getMetaTypeName() << "]" << endl; --- 319,325 ---- cout << endl << "Analyzing class [" << aMTPtr->getInstanceTypeName() ! << "] MetaType [" << aMTPtr->getMetaTypeName() << "]" << endl ! << "Namespace = " << aMTPtr->getDomainName() << endl ! << "Description = " << aMTPtr->getTypeDescription() << endl; |
|
From: Frank V. C. <fr...@us...> - 2000-11-11 17:45:57
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv30674/clfw Modified Files: Makefile.am MetaType.hpp Ontology.hpp Added Files: MetaSpace.hpp Log Message: 116737 Ontology Support ***** Error reading new file: (2, 'No such file or directory') Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** Makefile.am 2000/11/10 04:42:48 1.16 --- Makefile.am 2000/11/11 17:45:54 1.17 *************** *** 31,34 **** --- 31,35 ---- UnsignedInteger.hpp \ UnsignedShortInteger.hpp \ + MetaSpace.hpp \ Ontology.hpp \ Makefile.am Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** MetaType.hpp 2000/11/03 13:29:44 1.20 --- MetaType.hpp 2000/11/11 17:45:54 1.21 *************** *** 615,619 **** getTypeDescriptor() and getType() functions */ ! #define _DEFINE_ENTITY_ALWAYS_PARMS(className,identification,version) \ /** \ construct the theTypeDesc \ --- 615,619 ---- getTypeDescriptor() and getType() functions */ ! #define _DEFINE_ENTITY_ALWAYS_PARMS(className,identification,version,domain, description ) \ /** \ construct the theTypeDesc \ *************** *** 626,630 **** className##MetaType##Parents, \ className##Type##Members, \ ! className##DispatchTable, #define _DEFINE_SINGLE_STRINGID( className ) \ --- 626,632 ---- className##MetaType##Parents, \ className##Type##Members, \ ! className##DispatchTable, \ ! domain, \ ! description, \ #define _DEFINE_SINGLE_STRINGID( className ) \ *************** *** 653,660 **** } \ - #define _DEFINE_METATYPE_ALWAYS - - #define DECLARE_METATYPE_MEMBERS( className ) - /*! \def DEFINE_ABSTRACT_METATYPE( className, identifier, version ) --- 655,658 ---- *************** *** 664,670 **** \arg version: the version number of the MetaType */ ! #define DEFINE_ABSTRACT_METATYPE( className, identifier, version ) \ _DEFINE_ABSTRACT_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version) \ _DEFINE_SINGLE_STRINGID(className) \ _DEFINE_ENTITY_ALWAYS(className) --- 662,668 ---- \arg version: the version number of the MetaType */ ! #define DEFINE_ABSTRACT_METATYPE( className, identifier, version, domain, description ) \ _DEFINE_ABSTRACT_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_SINGLE_STRINGID(className) \ _DEFINE_ENTITY_ALWAYS(className) *************** *** 678,684 **** \arg version: the version number of the MetaType */ ! #define DEFINE_ABSTRACT_METATYPE1( className, metaName, identifier, version ) \ _DEFINE_ABSTRACT_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version) \ _DEFINE_DUAL_STRINGID(className,metaName) \ _DEFINE_ENTITY_ALWAYS(className) --- 676,682 ---- \arg version: the version number of the MetaType */ ! #define DEFINE_ABSTRACT_METATYPE1( className, metaName, identifier, version, domain, description ) \ _DEFINE_ABSTRACT_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_DUAL_STRINGID(className,metaName) \ _DEFINE_ENTITY_ALWAYS(className) *************** *** 692,699 **** */ ! #define DEFINE_METATYPE( className, identifier, version ) \ _DEFINE_FACTORY( className ) \ _DEFINE_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version) \ _DEFINE_SINGLE_STRINGID(className) \ ,&the##className##Allocator \ --- 690,697 ---- */ ! #define DEFINE_METATYPE( className, identifier, version , domain, description ) \ _DEFINE_FACTORY( className ) \ _DEFINE_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_SINGLE_STRINGID(className) \ ,&the##className##Allocator \ *************** *** 708,714 **** */ ! #define DEFINE_METATYPE_WITH_FACTORY( className, identifier, version ) \ _DEFINE_ENTITY_WITH_FACTORY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version) \ _DEFINE_SINGLE_STRINGID(className) \ ,&the##className##Allocator \ --- 706,712 ---- */ ! #define DEFINE_METATYPE_WITH_FACTORY( className, identifier, version, domain, description ) \ _DEFINE_ENTITY_WITH_FACTORY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_SINGLE_STRINGID(className) \ ,&the##className##Allocator \ *************** *** 725,732 **** \arg version: the version number of the MetaType */ ! #define DEFINE_METATYPE1( className, metaName, identifier, version ) \ _DEFINE_FACTORY( className ) \ _DEFINE_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version) \ _DEFINE_DUAL_STRINGID(className,metaName) \ ,&the##className##Allocator \ --- 723,730 ---- \arg version: the version number of the MetaType */ ! #define DEFINE_METATYPE1( className, metaName, identifier, version, domain, description ) \ _DEFINE_FACTORY( className ) \ _DEFINE_ENTITY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_DUAL_STRINGID(className,metaName) \ ,&the##className##Allocator \ *************** *** 743,749 **** \arg version: the version number of the MetaType */ ! #define DEFINE_METATYPE1_WITH_FACTORY( className, metaName, identifier, version ) \ _DEFINE_ENTITY_WITH_FACTORY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version) \ _DEFINE_DUAL_STRINGID(className,metaName) \ ,&the##className##Allocator \ --- 741,747 ---- \arg version: the version number of the MetaType */ ! #define DEFINE_METATYPE1_WITH_FACTORY( className, metaName, identifier, version, domain, description ) \ _DEFINE_ENTITY_WITH_FACTORY( className ) \ ! _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_DUAL_STRINGID(className,metaName) \ ,&the##className##Allocator \ *************** *** 774,777 **** --- 772,777 ---- @param MetaType pointer to array of parents @param MemberDescriptor pointer to array of members, + @param Char pointer to domain name (namespace) + @param Char pointer to description @param Char pointer to type instance (class) name @param Char pointer to MetaType name *************** *** 787,790 **** --- 787,792 ---- DispatchDescriptorCptr *, CharCptr , + CharCptr , + CharCptr , CharCptr ) throw ( Assertion ); *************** *** 798,801 **** --- 800,805 ---- @param MetaType pointer to array of parents @param MemberDescriptor pointer to array of members, + @param Char pointer to domain name (namespace) + @param Char pointer to description @param Char pointer to type instance (class) name @param Char pointer to MetaType name *************** *** 813,816 **** --- 817,822 ---- CharCptr , CharCptr , + CharCptr , + CharCptr , AllocatorPtr ) throw ( Assertion ); *************** *** 890,893 **** --- 896,914 ---- /** + get the description of this type + @return char pointer to description or null + */ + + CharCptr getTypeDescription( void ) const; + + /** + get the domain name (the Ontology) that this + type is a member of + @return char pointer to domain name, or null + */ + + CharCptr getDomainName( void ) const; + + /** get the Allocator associated to this MetaType. @return the allocator *************** *** 1025,1031 **** --- 1046,1055 ---- MemberDescriptorCptr *const theInstanceMembers; DispatchDescriptorCptr *const theDispatchFunctions; + CharCptr theDomainName; + CharCptr theTypeDescription; CharCptr theInstanceTypeName; CharCptr theMetaTypeName; AllocatorPtr theFactoryAllocator; + static CharCptr theDefaultDomainName; }; } Index: Ontology.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Ontology.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Ontology.hpp 2000/11/10 04:42:48 1.1 --- Ontology.hpp 2000/11/11 17:45:54 1.2 *************** *** 27,31 **** /*! ! \class Ontology manages namespace semantic hierarchies */ --- 27,31 ---- /*! ! \class Ontology represents a domain semantic network */ *************** *** 35,54 **** public: ! static void addType( MetaTypeCptr ); protected: private: ! Ontology( void ); ! Ontology( OntologyCref ); ! OntologyRef operator=( OntologyCref ); ! bool operator==( OntologyCref ) const; ! private: }; --- 35,100 ---- public: ! /** ! Default constructor takes a domain name ! @param char pointer to domain name ! */ + Ontology( CharCptr ); + + /** + Virtual destructor + */ + + virtual ~Ontology( void ); + + /// Equality operator + + bool operator==( OntologyCref ) const; + + /// gets the domain name + + CharCptr getDomainName( void ) const; + + /** + Add a new metatype to this ontology + @param MetaType const pointer to type + @exception InvalidType if domain name is not + the same as the ontology + */ + + virtual void addType( MetaTypeCptr ); + + /** + Add a child to a member of the ontology. This + does not store the type being added, but only + updates the child reference of an existing + type + @param MetaType const pointer to add + @param MetaType const pointer to add to + */ + + virtual void addAsChild( MetaTypeCptr , MetaTypeCptr ); + protected: + private: + /// Default constructor not allowed ! Ontology( void ); ! /// Copy constructur not allowed ! Ontology( OntologyCref ); ! /// Assignment operator not allowed + OntologyRef operator=( OntologyCref ); + + private: + + CharPtr theDomainName; + }; |
|
From: Frank V. C. <fr...@us...> - 2000-11-10 04:42:51
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv14166/src/libs/clfw Modified Files: Makefile.am MetaType.cpp Added Files: Ontology.cpp Log Message: 116737 Ontology work --- NEW FILE --- /* CoreLinux++ Copyright (C) 1999,2000 CoreLinux Consortium The CoreLinux++ Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The CoreLinux++ Library Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if !defined(__CLFWCOMMON_HPP) #include <ClfwCommon.hpp> #endif #if !defined(__ONTOLOGY_HPP) #include <Ontology.hpp> #endif extern "C" { #include <stdio.h> } namespace corelinux { Ontology::Ontology( void ) { } Ontology::Ontology( OntologyCref ) { } OntologyRef Ontology::operator=( OntologyCref ) { return ( *this ); } bool Ontology::operator==( OntologyCref ) const { return true; } void Ontology::addType( MetaTypeCptr aMetaType ) { printf("Have a type %s\n",aMetaType->getMetaTypeName()); } } Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** Makefile.am 2000/10/25 22:31:23 1.13 --- Makefile.am 2000/11/10 04:42:48 1.14 *************** *** 29,32 **** --- 29,33 ---- ShortInteger.cpp \ UnsignedInteger.cpp \ + Ontology.cpp \ UnsignedShortInteger.cpp Index: MetaType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaType.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** MetaType.cpp 2000/11/03 13:29:44 1.12 --- MetaType.cpp 2000/11/10 04:42:48 1.13 *************** *** 34,37 **** --- 34,41 ---- #endif + #if !defined(__ONTOLOGY_HPP) + #include <Ontology.hpp> + #endif + #include <cstring> *************** *** 66,70 **** theFactoryAllocator( NULLPTR ) { ! ; // do nothing } --- 70,74 ---- theFactoryAllocator( NULLPTR ) { ! Ontology::addType( this ); } *************** *** 96,100 **** theFactoryAllocator( aAllocation ) { ! ; // do nothing } --- 100,104 ---- theFactoryAllocator( aAllocation ) { ! Ontology::addType( this ); } |
|
From: Frank V. C. <fr...@us...> - 2000-11-10 04:42:51
|
Update of /cvsroot/corelinux/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv14166 Modified Files: README configure.in Log Message: 116737 Ontology work Index: README =================================================================== RCS file: /cvsroot/corelinux/clfw/README,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** README 2000/11/06 13:11:30 1.11 --- README 2000/11/10 04:42:47 1.12 *************** *** 1,4 **** ==================================================== ! CoreLinux++ Framework Source Distribution Beta 0.2.4 ==================================================== --- 1,4 ---- ==================================================== ! CoreLinux++ Framework Source Distribution Beta 0.2.5 ==================================================== Index: configure.in =================================================================== RCS file: /cvsroot/corelinux/clfw/configure.in,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** configure.in 2000/10/31 22:49:09 1.19 --- configure.in 2000/11/10 04:42:47 1.20 *************** *** 10,14 **** CLFW_MAJOR_VERSION=0 CLFW_MINOR_VERSION=2 ! CLFW_MICRO_VERSION=4 dnl --- 10,14 ---- CLFW_MAJOR_VERSION=0 CLFW_MINOR_VERSION=2 ! CLFW_MICRO_VERSION=5 dnl |
|
From: Frank V. C. <fr...@us...> - 2000-11-10 04:42:51
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv14166/clfw Modified Files: Makefile.am UniversalIdentifier.hpp Added Files: Ontology.hpp Log Message: 116737 Ontology work ***** Error reading new file: (2, 'No such file or directory') Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** Makefile.am 2000/10/25 22:31:22 1.15 --- Makefile.am 2000/11/10 04:42:48 1.16 *************** *** 31,34 **** --- 31,35 ---- UnsignedInteger.hpp \ UnsignedShortInteger.hpp \ + Ontology.hpp \ Makefile.am Index: UniversalIdentifier.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/UniversalIdentifier.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** UniversalIdentifier.hpp 2000/10/03 23:16:17 1.3 --- UniversalIdentifier.hpp 2000/11/10 04:42:48 1.4 *************** *** 37,43 **** /*! ! \class UniversalIdentifier ! @version $Id$ */ class UniversalIdentifier : public Identifier { --- 37,44 ---- /*! ! \class UniversalIdentifier provides a universal unique identifier ! type */ + class UniversalIdentifier : public Identifier { *************** *** 76,88 **** // Operator overloads // - /// copy operator from a UniversalIdentifierCref UniversalIdentifierRef operator=( UniversalIdentifierCref ); ! /// copy operator from a CharPtr UniversalIdentifierRef operator=( CharPtr ) throw ( Assertion ); ! /// copy operator from a UniqueIdRef UniversalIdentifierRef operator=( UniqueIdRef ); ! /// copy operator from a UniqueIdPtr UniversalIdentifierRef operator=( UniqueIdPtr ) throw ( Assertion ); --- 77,96 ---- // Operator overloads // + + /// copy operator from a UniversalIdentifierCref UniversalIdentifierRef operator=( UniversalIdentifierCref ); ! ! /// copy operator from a CharPtr ! UniversalIdentifierRef operator=( CharPtr ) throw ( Assertion ); ! ! /// copy operator from a UniqueIdRef ! UniversalIdentifierRef operator=( UniqueIdRef ); ! ! /// copy operator from a UniqueIdPtr ! UniversalIdentifierRef operator=( UniqueIdPtr ) throw ( Assertion ); |
|
From: Frank V. C. <fr...@us...> - 2000-11-06 23:05:33
|
Update of /cvsroot/corelinux/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv2409 Modified Files: download.php Log Message: Release 0.2.4 Index: download.php =================================================================== RCS file: /cvsroot/corelinux/htdocs/download.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** download.php 2000/11/06 13:18:10 1.15 --- download.php 2000/11/06 23:05:30 1.16 *************** *** 9,13 **** $cl_release_deb=1; $clfw_release="0.2.4"; ! $clfwdeb_release="0.2.3"; $clfw_release_rpm=1; $clfw_release_deb=1; --- 9,13 ---- $cl_release_deb=1; $clfw_release="0.2.4"; ! $clfwdeb_release="0.2.4"; $clfw_release_rpm=1; $clfw_release_deb=1; |
|
From: Christophe Prud'h. <pru...@us...> - 2000-11-06 19:09:53
|
Update of /cvsroot/corelinux/clfw/debian In directory slayer.i.sourceforge.net:/tmp/cvs-serv10188 Modified Files: rules changelog Log Message: update for 0.2.4 Index: rules =================================================================== RCS file: /cvsroot/corelinux/clfw/debian/rules,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** rules 2000/10/29 20:41:04 1.5 --- rules 2000/11/06 19:09:49 1.6 *************** *** 4,8 **** package=libclfw ! version=0.2.2 version_major=0 --- 4,8 ---- package=libclfw ! version=0.2.4 version_major=0 Index: changelog =================================================================== RCS file: /cvsroot/corelinux/clfw/debian/changelog,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** changelog 2000/10/29 20:41:04 1.4 --- changelog 2000/11/06 19:09:49 1.5 *************** *** 1,2 **** --- 1,14 ---- + libclfw (0.2.4-1) unstable; urgency=low + + * new upstream release + + -- Christophe Prud'homme <pru...@mi...> Mon, 6 Nov 2000 14:09:15 -0500 + + libclfw (0.2.3-1) unstable; urgency=low + + * new upstream version. + + -- Christophe Prud'homme <pru...@mi...> Tue, 31 Oct 2000 10:20:13 -0400 + libclfw (0.2.2-1) unstable; urgency=low |
|
From: Frank V. C. <fr...@us...> - 2000-11-06 13:18:13
|
Update of /cvsroot/corelinux/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv1906 Modified Files: download.php news.php Log Message: 119868 release 0.2.4 Index: download.php =================================================================== RCS file: /cvsroot/corelinux/htdocs/download.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** download.php 2000/10/31 16:09:54 1.14 --- download.php 2000/11/06 13:18:10 1.15 *************** *** 8,12 **** $cl_release_rpm=1; $cl_release_deb=1; ! $clfw_release="0.2.3"; $clfwdeb_release="0.2.3"; $clfw_release_rpm=1; --- 8,12 ---- $cl_release_rpm=1; $cl_release_deb=1; ! $clfw_release="0.2.4"; $clfwdeb_release="0.2.3"; $clfw_release_rpm=1; Index: news.php =================================================================== RCS file: /cvsroot/corelinux/htdocs/news.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** news.php 2000/10/31 12:51:53 1.30 --- news.php 2000/11/06 13:18:10 1.31 *************** *** 41,44 **** --- 41,50 ---- <? + add_breaking_news("11/06/2000", + "libclfw++ 0.2.4 released!", + "New Library released", + "rel-0-2-4", + "Fixes rpm bug preventing install, add new dispatch on MetaType that does not require an FrameEntity object pointer."); + add_breaking_news("10/31/2000", "libclfw++ 0.2.3 released!", *************** *** 364,367 **** --- 370,374 ---- echo "<table compact width=100% border=0>\n"; + add_small_news("11/05","rel-0-2-4","libclfw++ 0.2.4"); add_small_news("10/31","rel-0-2-3","libclfw++ 0.2.3"); add_small_news("10/26","rel-0-2-2","libclfw++ 0.2.2"); |
|
From: Frank V. C. <fr...@us...> - 2000-11-06 13:11:34
|
Update of /cvsroot/corelinux/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv1521 Modified Files: README Log Message: 119868 Release 0.2.4 Index: README =================================================================== RCS file: /cvsroot/corelinux/clfw/README,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** README 2000/10/31 22:49:09 1.10 --- README 2000/11/06 13:11:30 1.11 *************** *** 18,28 **** 0. Pre-pre-amble ! We have been stocking up on the basic type wrappers in our drive ! to provide frameworks with the ability to reason with objects dynamically. ! Along those lines, this release adds the ability to define functions to ! the MetaType that can be called through a dispatch method. We have provided ! an example on how to do this in the testdrivers directory of the source ! distribution. Requirements --- 18,26 ---- 0. Pre-pre-amble ! New interface on MetaType allows a dispatch without the need for providing a ! FrameworkEntity pointer. This enables static methods or functions that don't ! require the object to be called. ! See ChangeLog for more details Requirements |
|
From: Frank V. C. <fr...@us...> - 2000-11-04 11:47:23
|
Update of /cvsroot/corelinux/models In directory slayer.i.sourceforge.net:/tmp/cvs-serv3395 Modified Files: 10658-MetaClass.mdr 10658-MetaClass.xml.zip Log Message: 10658 MetaType Index: 10658-MetaClass.mdr =================================================================== RCS file: /cvsroot/corelinux/models/10658-MetaClass.mdr,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** 10658-MetaClass.mdr 2000/10/06 11:28:20 1.4 --- 10658-MetaClass.mdr 2000/11/04 11:47:20 1.5 *************** *** 46,51 **** (C++LanguageProperties (mProperties mName "Class" ! mObjectDataID "ID0000000000f5" IMPLEMENTATION_TYPE "<empty>" ) --- 46,61 ---- (C++LanguageProperties (mProperties + mName "Generalization" + mObjectDataID "ID000000000006" + VIRTUAL_MODIFIER "virtual" + ) + (mProperties + mName "Generalization" + mObjectDataID "ID00000000001e" + VIRTUAL_MODIFIER "virtual" + ) + (mProperties mName "Class" ! mObjectDataID "ID000000000004" IMPLEMENTATION_TYPE "<empty>" ) *************** *** 55,59 **** ) (RTProjectGroupObject ! mID "ID0000000000f4" mName "Code engineering sets" ) --- 65,69 ---- ) (RTProjectGroupObject ! mID "ID000000000137" mName "Code engineering sets" ) Index: 10658-MetaClass.xml.zip =================================================================== RCS file: /cvsroot/corelinux/models/10658-MetaClass.xml.zip,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 Binary files /tmp/cvs6z7O3d and /tmp/cvsq8ovGj differ |
|
From: Frank V. C. <fr...@us...> - 2000-11-03 13:29:47
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv4310/src/libs/clfw Modified Files: MetaType.cpp Log Message: 119868 Release 0.2.4 prep Index: MetaType.cpp =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaType.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** MetaType.cpp 2000/10/30 05:01:25 1.11 --- MetaType.cpp 2000/11/03 13:29:44 1.12 *************** *** 386,390 **** ( FrameworkEntityPtr aInstanceObject, ! char *aMethodName, void **args, void *retArg --- 386,390 ---- ( FrameworkEntityPtr aInstanceObject, ! char *aFunctionName, void **args, void *retArg *************** *** 392,396 **** throw( NullPointerException, DescriptorNotFound ) { ! if( aMethodName == NULLPTR || aInstanceObject == NULLPTR ) { throw NullPointerException(LOCATION); --- 392,396 ---- throw( NullPointerException, DescriptorNotFound ) { ! if( aFunctionName == NULLPTR || aInstanceObject == NULLPTR ) { throw NullPointerException(LOCATION); *************** *** 411,415 **** while( *pMd != NULLPTR ) { ! if( strcmp((*pMd)->theClassMethodName,aMethodName) == 0 ) { aDesc = *pMd; --- 411,415 ---- while( *pMd != NULLPTR ) { ! if( strcmp((*pMd)->theClassMethodName,aFunctionName) == 0 ) { aDesc = *pMd; *************** *** 433,437 **** if( aDesc == NULLPTR ) { ! throw DescriptorNotFound(aMethodName, LOCATION); } else --- 433,497 ---- if( aDesc == NULLPTR ) { ! throw DescriptorNotFound(aFunctionName, LOCATION); ! } ! else ! { ! ; // do nothing ! } ! } ! // ! // Dispatch Method ! // ! ! void MetaType::dispatch ! ( ! char *aFunctionName, ! void **args, ! void *retArg ! ) ! throw( NullPointerException, DescriptorNotFound ) ! { ! if( aFunctionName == NULLPTR ) ! { ! throw NullPointerException(LOCATION); ! } ! else ! { ! ; // do nothing ! } ! ! // ! // Get the descriptor, function, and subsequent value ! // ! ! DispatchDescriptorCptr aDesc( NULLPTR ); ! ! DispatchDescriptorCptr *pMd(theDispatchFunctions); ! ! while( *pMd != NULLPTR ) ! { ! if( strcmp((*pMd)->theClassMethodName,aFunctionName) == 0 ) ! { ! aDesc = *pMd; ! if( aDesc->theFunction != NULLPTR ) ! { ! (*(aDesc->theFunction))(NULLPTR, args, retArg ); ! } ! else ! { ! throw NullPointerException(LOCATION); ! } ! break; ! } ! else ! { ! ; // do nothing ! } ! ++pMd; ! } ! ! if( aDesc == NULLPTR ) ! { ! throw DescriptorNotFound(aFunctionName, LOCATION); } else |
|
From: Frank V. C. <fr...@us...> - 2000-11-03 13:29:46
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv4310/clfw Modified Files: MetaType.hpp Log Message: 119868 Release 0.2.4 prep Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** MetaType.hpp 2000/10/30 05:01:25 1.19 --- MetaType.hpp 2000/11/03 13:29:44 1.20 *************** *** 364,367 **** --- 364,383 ---- className##Ptr myPointer = className::castDown( aClass ); + /*! + \def DISPATCH_FUNCTION( className, methName ) + \brief Opens the standard header, body required to do something + \arg className : base name for method + \arg methName : unique name identifier + */ + + #define DISPATCH_STATIC_FUNCTION( className, methName ) \ + static void className##methName \ + ( \ + corelinux::FrameworkEntityPtr aClass, \ + void **args, \ + void *ret \ + ) \ + { + #define CLOSE_DISPATH_FUNCTION \ } *************** *** 971,974 **** --- 987,1003 ---- void dispatch( FrameworkEntityPtr, char *, void **, void * ) + throw( NullPointerException, DescriptorNotFound ); + + /** + Attempts to call the method via a dispatch function on + the object + @param char pointer to the named method (used for lookup) + @param void pointer array of arguments + @param void pointer to return value + @exception NullpointerException if object or name are null + @exception DescriptorNotFound if no match + */ + + void dispatch( char *, void **, void * ) throw( NullPointerException, DescriptorNotFound ); //@} |