|
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" ! ); // |