|
From: Frank V. C. <fr...@us...> - 2000-11-15 23:07:24
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv22653/clfw Modified Files: MetaClass.hpp MetaSpace.hpp MetaType.hpp MetaTypeFixedIterator.hpp Ontology.hpp Log Message: 116737 Finishing touches Index: MetaClass.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaClass.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** MetaClass.hpp 2000/11/15 12:29:30 1.3 --- MetaClass.hpp 2000/11/15 23:07:20 1.4 *************** *** 37,41 **** { DECLARE_CLASS( MetaClass ); ! CORELINUX_SET( MetaClassCptr, less<MetaClassCptr>, Children ); /** --- 37,41 ---- { DECLARE_CLASS( MetaClass ); ! CORELINUX_SET( MetaClassPtr, less<MetaClassPtr>, Children ); /** *************** *** 44,48 **** */ ! class MetaClass : public TransparentComponent< MetaClassCptr > { friend class Ontology; --- 44,48 ---- */ ! class MetaClass : public TransparentComponent< MetaClassPtr > { friend class Ontology; *************** *** 96,100 **** */ ! virtual void addComponent( MetaClassCptr ) throw( InvalidCompositeException ); --- 96,100 ---- */ ! virtual void addComponent( MetaClassPtr ) throw( InvalidCompositeException ); *************** *** 106,110 **** ! virtual void removeComponent( MetaClassCptr ) throw( InvalidCompositeException ); --- 106,110 ---- ! virtual void removeComponent( MetaClassPtr ) throw( InvalidCompositeException ); *************** *** 119,123 **** */ ! virtual Iterator<MetaClassCptr>* createIterator( void ) throw( InvalidCompositeException ); --- 119,123 ---- */ ! virtual Iterator<MetaClassPtr>* createIterator( void ) throw( InvalidCompositeException ); *************** *** 127,131 **** */ ! virtual Iterator<MetaClassCptr>* createParentIterator( void ) throw( InvalidCompositeException ); --- 127,131 ---- */ ! virtual Iterator<MetaClassPtr>* createParentIterator( void ) throw( InvalidCompositeException ); *************** *** 136,140 **** */ ! virtual Iterator<MemberDescriptorCptr> *createMemberIterator( void ) throw( InvalidCompositeException ); --- 136,140 ---- */ ! virtual Iterator<MemberDescriptorPtr> *createMemberIterator( void ) throw( InvalidCompositeException ); *************** *** 145,149 **** */ ! virtual Iterator<DispatchDescriptorCptr> *createMethodIterator( void ) throw( InvalidCompositeException ); --- 145,149 ---- */ ! virtual Iterator<DispatchDescriptorPtr> *createMethodIterator( void ) throw( InvalidCompositeException ); *************** *** 153,157 **** */ ! virtual void destroyIterator( Iterator<MetaClassCptr>* ) throw( InvalidCompositeException ); --- 153,157 ---- */ ! virtual void destroyIterator( Iterator<MetaClassPtr>* ) throw( InvalidCompositeException ); *************** *** 161,165 **** */ ! virtual void destroyIterator( Iterator<MemberDescriptorCptr> * ) throw( InvalidCompositeException ); --- 161,165 ---- */ ! virtual void destroyIterator( Iterator<MemberDescriptorPtr> * ) throw( InvalidCompositeException ); *************** *** 169,174 **** */ ! virtual void destroyIterator( Iterator<DispatchDescriptorCptr> * ) throw( InvalidCompositeException ); protected: --- 169,175 ---- */ ! virtual void destroyIterator( Iterator<DispatchDescriptorPtr> * ) throw( InvalidCompositeException ); + protected: *************** *** 185,189 **** /// Used by Ontology to create a new class ! MetaClass( MetaTypeCptr ); /// Assignment operator not used --- 186,190 ---- /// Used by Ontology to create a new class ! MetaClass( MetaTypePtr ); /// Assignment operator not used *************** *** 195,199 **** /// The underlying MetaType ! MetaTypeCptr theType; /// The composite children --- 196,200 ---- /// The underlying MetaType ! MetaTypePtr theType; /// The composite children Index: MetaSpace.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaSpace.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** MetaSpace.hpp 2000/11/15 04:33:01 1.4 --- MetaSpace.hpp 2000/11/15 23:07:20 1.5 *************** *** 47,51 **** */ ! static MetaClassCptr getClassForType( MetaTypeCptr ); /** --- 47,51 ---- */ ! static MetaClassPtr getClassForType( MetaTypePtr ); /** Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** MetaType.hpp 2000/11/15 12:29:30 1.23 --- MetaType.hpp 2000/11/15 23:07:20 1.24 *************** *** 761,764 **** --- 761,770 ---- class MetaType { + struct _infolink + { + void *data; + _infolink *next; + }; + DECLARE_TYPE( struct _infolink, InfoLink ); public: *************** *** 866,876 **** /** - get the Parent types. - @return an array of MetaType - */ - - MetaTypeCptr * const getParentTypes( void ) const; - - /** get the parent count @return Count of parents (0 if root) --- 872,875 ---- *************** *** 880,890 **** /** - get the instance member descriptors - @return an array of MemberDescriptor structures - */ - - MemberDescriptorCptr * const getInstanceMembers( void ) const; - - /** get the instance member (attributes) count @return Count of data members --- 879,882 ---- *************** *** 894,904 **** /** - 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 --- 886,889 ---- *************** *** 982,986 **** */ ! Iterator<MetaTypeCptr>* createParentIterator( void ); /** --- 967,971 ---- */ ! Iterator<MetaTypePtr>* createParentIterator( void ); /** *************** *** 990,994 **** */ ! Iterator<MemberDescriptorCptr> *createMemberIterator( void ); /** --- 975,979 ---- */ ! Iterator<MemberDescriptorPtr> *createMemberIterator( void ); /** *************** *** 998,1002 **** */ ! Iterator<DispatchDescriptorCptr> *createMethodIterator( void ); /** --- 983,987 ---- */ ! Iterator<DispatchDescriptorPtr> *createMethodIterator( void ); /** *************** *** 1005,1009 **** */ ! void destroyIterator( Iterator<MetaTypeCptr>* ); /** --- 990,994 ---- */ ! void destroyIterator( Iterator<MetaTypePtr>* ); /** *************** *** 1012,1016 **** */ ! void destroyIterator( Iterator<MemberDescriptorCptr> * ); /** --- 997,1001 ---- */ ! void destroyIterator( Iterator<MemberDescriptorPtr> * ); /** *************** *** 1019,1023 **** */ ! void destroyIterator( Iterator<DispatchDescriptorCptr> * ); //@} --- 1004,1008 ---- */ ! void destroyIterator( Iterator<DispatchDescriptorPtr> * ); //@} *************** *** 1119,1125 **** DwordCref theInstanceSize; UniversalIdentifierCref theTypeId; ! MetaTypeCptr *const theBaseClasses; ! MemberDescriptorCptr *const theInstanceMembers; ! DispatchDescriptorCptr *const theDispatchFunctions; CharCptr theDomainName; CharCptr theTypeDescription; --- 1104,1110 ---- DwordCref theInstanceSize; UniversalIdentifierCref theTypeId; ! InfoLink *theParents; ! InfoLink *theMembers; ! InfoLink *theMethods; CharCptr theDomainName; CharCptr theTypeDescription; Index: MetaTypeFixedIterator.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaTypeFixedIterator.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MetaTypeFixedIterator.hpp 2000/11/15 12:29:30 1.1 --- MetaTypeFixedIterator.hpp 2000/11/15 23:07:20 1.2 *************** *** 36,51 **** Iterator<T>(), theBase( NULLPTR ), ! theCurrent( NULLPTR ), ! theCount( 0 ) { ; // do nothing } ! MetaTypeFixedIterator( T *a, Count aCount ) : Iterator<T>(), ! theBase( a ), ! theCurrent( a ), ! theCount( aCount ) { ; // do nothing --- 36,49 ---- Iterator<T>(), theBase( NULLPTR ), ! theCurrent( NULLPTR ) { ; // do nothing } ! MetaTypeFixedIterator( MetaType::InfoLinkPtr aLink ) : Iterator<T>(), ! theBase( aLink ), ! theCurrent( aLink ) { ; // do nothing *************** *** 59,64 **** Iterator<T>( aRef ), theBase( aRef.theBase ), ! theCurrent( theBase ), ! theCount( aRef.theCount ) { ; // do nothing --- 57,61 ---- Iterator<T>( aRef ), theBase( aRef.theBase ), ! theCurrent( theBase ) { ; // do nothing *************** *** 68,77 **** { theBase = theCurrent = NULLPTR; - theCount = 0; } virtual bool isValid( void ) const { ! return !(*theCurrent == NULLPTR); } --- 65,73 ---- { theBase = theCurrent = NULLPTR; } virtual bool isValid( void ) const { ! return (theCurrent->data != NULLPTR); } *************** *** 88,92 **** ; // do nothing } ! return (*theCurrent); } --- 84,88 ---- ; // do nothing } ! return (T)theCurrent->data; } *************** *** 100,106 **** throw(IteratorBoundsException) { ! if( *theCurrent != NULLPTR ) { ! ++theCurrent; } else --- 96,102 ---- throw(IteratorBoundsException) { ! if( theCurrent->next != NULLPTR ) { ! theCurrent = theCurrent->next; } else *************** *** 115,121 **** { if( theCurrent != theBase && ! *theBase != NULLPTR ) { ! --theCurrent; } else --- 111,130 ---- { if( theCurrent != theBase && ! theBase->data != NULLPTR ) { ! MetaType::InfoLinkPtr aPos( theBase ); ! ! while( aPos != NULLPTR && aPos != theCurrent ) ! { ! if( aPos->next != NULLPTR && ! aPos->next == theCurrent ) ! { ! theCurrent = aPos; ! } ! else ! { ! aPos = aPos->next; ! } ! } } else *************** *** 131,135 **** { theCurrent = theBase; ! for( Count x = 0; x < theCount; ++x, ++theCurrent ); } --- 140,147 ---- { theCurrent = theBase; ! while( theCurrent->next != NULLPTR ) ! { ! theCurrent = theCurrent->next; ! } } *************** *** 137,143 **** private: ! T *theBase; ! T *theCurrent; ! Count theCount; }; --- 149,154 ---- private: ! MetaType::InfoLinkPtr theBase; ! MetaType::InfoLinkPtr theCurrent; }; Index: Ontology.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Ontology.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Ontology.hpp 2000/11/15 04:33:01 1.5 --- Ontology.hpp 2000/11/15 23:07:20 1.6 *************** *** 39,45 **** CORELINUX_MAP ( ! MetaTypeCptr, MetaClassPtr, ! less<MetaTypeCptr>, ClassMap ); --- 39,45 ---- CORELINUX_MAP ( ! MetaTypePtr, MetaClassPtr, ! less<MetaTypePtr>, ClassMap ); *************** *** 99,103 **** */ ! virtual void addMetaType( MetaTypeCptr ); /** --- 99,103 ---- */ ! virtual void addMetaType( MetaTypePtr ); /** *************** *** 110,114 **** */ ! virtual void addAsChild( MetaTypeCptr , MetaClassCptr ) throw ( NullPointerException ); --- 110,114 ---- */ ! virtual void addAsChild( MetaTypePtr , MetaClassPtr ) throw ( NullPointerException ); *************** *** 122,126 **** */ ! virtual void addAsChild( UniversalIdentifierCref , MetaTypeCptr ) throw ( NullPointerException ); --- 122,126 ---- */ ! virtual void addAsChild( UniversalIdentifierCref , MetaTypePtr ) throw ( NullPointerException ); *************** *** 159,163 **** */ ! MetaClassCptr getClass( MetaTypeCptr ) const; private: --- 159,163 ---- */ ! MetaClassPtr getClass( MetaTypePtr ) const; private: *************** *** 176,180 **** /// Seed the ontology before creating hierarchy ! void seedMetaType( MetaTypeCptr ); /// Establish hierarchy --- 176,180 ---- /// Seed the ontology before creating hierarchy ! void seedMetaType( MetaTypePtr ); /// Establish hierarchy *************** *** 184,188 **** /// Sets the type in this ontology ! void insertType( MetaTypeCptr, MetaClassPtr ); private: --- 184,188 ---- /// Sets the type in this ontology ! void insertType( MetaTypePtr, MetaClassPtr ); private: |