|
From: Frank V. C. <fr...@us...> - 2000-10-04 02:45:44
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv12931 Modified Files: MetaType.hpp Log Message: 113427 Added defined size and name Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** MetaType.hpp 2000/10/03 23:59:05 1.6 --- MetaType.hpp 2000/10/04 02:45:37 1.7 *************** *** 44,47 **** --- 44,48 ---- \arg className the class name */ + #define DECLARE_METATYPEMEMBERS( className ) \ public: \ *************** *** 69,73 **** redefine the operator new[] \ \arg aSize \ ! \return a VoidPtr \ */ \ VoidPtr operator new(size_t aSize); \ --- 70,74 ---- redefine the operator new[] \ \arg aSize \ ! \return a VoidPtr \ */ \ VoidPtr operator new(size_t aSize); \ *************** *** 88,92 **** array storing the parents descriptors \ */ \ ! MetaType const *className##MetaType##Parents[] = \ { \ --- 89,93 ---- array storing the parents descriptors \ */ \ ! MetaType const * className##MetaType##Parents[] = \ { \ *************** *** 125,131 **** */ #define _DEFINE_ENTITY(className) \ /** \ create a new pointer to className \ ! \return the allocated pointer \ */ \ className##Ptr className::create( void ) \ --- 126,134 ---- */ #define _DEFINE_ENTITY(className) \ + const Dword className##Size(sizeof(className)); \ + const CharPtr className##Name = #className; \ /** \ create a new pointer to className \ ! \return the allocated pointer \ */ \ className##Ptr className::create( void ) \ *************** *** 149,157 **** /** \ redefine the operator new for className \ ! this operator use the className::create() \ ! function \ \return a VoidPtr \ */ \ ! VoidPtr className::operator new(size_t aSize) \ { \ return (VoidPtr)className::create(); \ --- 152,160 ---- /** \ redefine the operator new for className \ ! this operator use the className::create() \ ! function \ \return a VoidPtr \ */ \ ! VoidPtr className::operator new( size_t ) \ { \ return (VoidPtr)className::create(); \ *************** *** 181,194 **** identification \ ,version \ ! ,sizeof(className) \ ,className##MetaType##Parents #define _DEFINE_SINGLE_STRINGID( className ) \ ! ,#className \ ! ,#className #define _DEFINE_DUAL_STRINGID( className, metaName ) \ ! ,#className \ ,#metaName --- 184,197 ---- identification \ ,version \ ! ,className##Size \ ,className##MetaType##Parents #define _DEFINE_SINGLE_STRINGID( className ) \ ! ,className##Name \ ! ,className##Name #define _DEFINE_DUAL_STRINGID( className, metaName ) \ ! ,className##Name \ ,#metaName *************** *** 244,248 **** /*! \def DEFINE_METATYPE( className, metaName, identifier, version ) ! define a new MetaType but gives a name to the class as a meta class \arg className: the class name \arg metaName: the meta class name --- 247,253 ---- /*! \def DEFINE_METATYPE( className, metaName, identifier, version ) ! define a new MetaType but gives a name to the metatype. For example, ! the FrameworkEntity passes MetaTypeRoot which is destined to be the ! root of all MetaTypes \arg className: the class name \arg metaName: the meta class name *************** *** 326,378 **** //@{ ! /** ! get the UniversalIdentifier associated to the MetaType. ! @return a UniversalIdentifierCref ! */ UniversalIdentifierCref getIdentifier( void ) const; ! /** ! get the version of the MetaType. ! @return the version ! */ ! DwordCref getTypeVersion( void ) const; ! ! /** ! get the Parent types. ! @return an array of MetaType ! */ ! MetaTypeCptr * const getParentTypes( void ) const; - /** - get the name of the instance of this MetaType. - @return the name of the instance of this MetaType - */ - CharCptr getInstanceTypeName( void ) const; - - /** - get the name of this MetaType. - @return the name of this MetaType - */ - CharCptr getMetaTypeName( void ) const; - - /** - get the Allocator associated to this MetaType. - @return the allocator - */ - AllocatorPtr getAllocator( void ) const; - - /** - test if this MetaType is of the same type as aMetaType. - @arg aMetaType the MetaType to test with - @return true if the same false otherwise - */ bool isType( MetaTypeCptr aMetaType ) const throw ( Assertion ); ! /** ! test if this MetaType is of the same type as aMetaType. ! @arg aMetaType the MetaType to test with ! @return true if the same false otherwise ! */ bool isTypeOf( MetaTypeCptr ) const throw ( Assertion ); --- 331,391 ---- //@{ ! /** ! get the UniversalIdentifier associated to the MetaType. ! @return a UniversalIdentifierCref ! */ ! UniversalIdentifierCref getIdentifier( void ) const; ! /** ! get the version of the MetaType. ! @return the version ! */ ! ! DwordCref getTypeVersion( void ) const; ! ! /** ! get the Parent types. ! @return an array of MetaType ! */ ! ! MetaTypeCptr * const getParentTypes( void ) const; ! ! /** ! get the name of the instance of this MetaType. ! @return the name of the instance of this MetaType ! */ ! ! CharCptr getInstanceTypeName( void ) const; ! ! /** ! get the name of this MetaType. ! @return the name of this MetaType ! */ ! ! CharCptr getMetaTypeName( void ) const; ! ! /** ! get the Allocator associated to this MetaType. ! @return the allocator ! */ ! ! AllocatorPtr getAllocator( void ) const; ! ! /** ! test if this MetaType is of the same type as aMetaType. ! @arg aMetaType the MetaType to test with ! @return true if the same false otherwise ! */ bool isType( MetaTypeCptr aMetaType ) const throw ( Assertion ); ! /** ! test if this MetaType is of the same type as aMetaType. ! @arg aMetaType the MetaType to test with ! @return true if the same false otherwise ! */ ! bool isTypeOf( MetaTypeCptr ) const throw ( Assertion ); *************** *** 381,388 **** // ! /** ! tells if the MetaType is an abstract one or not ! @return true if it is an abstract metatype false otherwise ! */ bool isAbstractType( void ) const; --- 394,402 ---- // ! /** ! tells if the MetaType is an abstract one or not ! @return true if it is an abstract metatype false otherwise ! */ ! bool isAbstractType( void ) const; *************** *** 391,398 **** protected: ! /// default constructor is protected MetaType( void ) throw ( Assertion ); - /// copy constructor is protected MetaType( MetaTypeCref ) throw ( Assertion ); --- 405,414 ---- protected: ! /// default constructor is protected ! MetaType( void ) throw ( Assertion ); + + /// copy constructor is protected MetaType( MetaTypeCref ) throw ( Assertion ); |