|
From: Frank V. C. <fr...@us...> - 2000-10-21 14:08:41
|
Update of /cvsroot/corelinux/clfw/clfw In directory slayer.i.sourceforge.net:/tmp/cvs-serv27564 Modified Files: MetaType.hpp Log Message: Added get method to invoke instance accessor Index: MetaType.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** MetaType.hpp 2000/10/16 03:05:07 1.12 --- MetaType.hpp 2000/10/21 14:08:39 1.13 *************** *** 32,35 **** --- 32,37 ---- DECLARE_CLASS( FrameworkEntity ); DECLARE_CLASS( MetaType ); + DECLARE_CLASS( DescriptorNotFound ); + DECLARE_CLASS( AccessorNotFound ); /*! *************** *** 122,127 **** DECLARE_TYPE(struct _InstanceMemberDescriptor, MemberDescriptor ); #define _DECLARE_INSTANCEDATA_STATICS(dataName) \ - public: \ static MemberDescriptor the##dataName##Descriptor; \ static void *get##dataName##AsVPtr( FrameworkEntityPtr ); \ --- 124,134 ---- DECLARE_TYPE(struct _InstanceMemberDescriptor, MemberDescriptor ); + /*! def _DECLARE_INSTANCEDATA_STATICS( dataName ) + \brief Declare static members and methods for supporting type + instance access by MetaType instance + \arg dataName : the member instance variable name + */ + #define _DECLARE_INSTANCEDATA_STATICS(dataName) \ static MemberDescriptor the##dataName##Descriptor; \ static void *get##dataName##AsVPtr( FrameworkEntityPtr ); \ *************** *** 272,283 **** --- 279,313 ---- + /*! + \def OPEN_INSTANCEDATA( className ) + \brief Each attribute in a type can be exposed to it's + MetaType for reasoning and access in the user space + \arg className: the class used as part of the unique array name + */ + #define OPEN_INSTANCEDATA( className ) \ + /** \ + Array storing the attribute descriptors \ + */ \ MemberDescriptor const *className##Type##Members[] = \ { \ + /*! + \def DEFINE_INSTANCEDATA( className, dataName ) + \brief Creates the MemberDescriptor entry in the array + \arg className: used to reference the static descriptor + \arg dataName : the instance data member variable name + */ + #define DEFINE_INSTANCEDATA( className, dataName ) \ + /** \ + Attribute descriptor \ + */ \ &className::the##dataName##Descriptor, \ #define CLOSE_INSTANCEDATA \ + /** \ + Close the attribute descriptor array \ + */ \ MemberDescriptorCptr( NULLPTR ) \ } *************** *** 371,387 **** MetaType className::theTypeDesc \ ( \ ! identification \ ! ,version \ ! ,className##Size \ ! ,className##MetaType##Parents \ ! ,className##Type##Members #define _DEFINE_SINGLE_STRINGID( className ) \ ! ,className##Name \ ,MetaType##className##Name #define _DEFINE_DUAL_STRINGID( className, metaName ) \ ! ,className##Name \ ,#metaName --- 401,417 ---- MetaType className::theTypeDesc \ ( \ ! identification, \ ! version, \ ! className##Size, \ ! className##MetaType##Parents, \ ! className##Type##Members, #define _DEFINE_SINGLE_STRINGID( className ) \ ! className##Name \ ,MetaType##className##Name #define _DEFINE_DUAL_STRINGID( className, metaName ) \ ! className##Name \ ,#metaName *************** *** 456,462 **** \class MetaType This class contains the meta informations on the classes using the metaClass framework. - - \version $Id$ */ class MetaType { --- 486,491 ---- \class MetaType This class contains the meta informations on the classes using the metaClass framework. */ + class MetaType { *************** *** 464,470 **** public: ! /** @name Constructor and destructor */ ! //@{ /** Constructor requires meaningful information --- 493,499 ---- public: ! /** @name Constructor and destructor */ ! //@{ /** Constructor requires meaningful information *************** *** 520,530 **** virtual ~MetaType( void ); ! //@} ! /** @name Accessors */ ! //@{ ! /** get the UniversalIdentifier associated to the MetaType. @return a UniversalIdentifierCref --- 549,560 ---- virtual ~MetaType( void ); ! //@} ! /** @name MetaType Accessors ! General accessors for the meta type and various descriptors */ ! //@{ ! /** get the UniversalIdentifier associated to the MetaType. @return a UniversalIdentifierCref *************** *** 610,615 **** bool isAbstractType( void ) const; ! //@} protected: --- 640,668 ---- bool isAbstractType( void ) const; ! //@} + /** @name Instance Accessors and methods interfaces + */ + //@{ + + /** + Attempts to access to the specified attribute + @param Char pointer to value name + @param FrameworkEntity pointer to instance + @return VoidPtr to value + @exception NullPointerException if name is null + @exception DescriptorNotFound if no match + @exception AccessorNotFound if no getter method + */ + + VoidPtr get( CharCptr, FrameworkEntityPtr ) const + throw + ( + NullPointerException, + DescriptorNotFound, + AccessorNotFound + ); + //@} + protected: *************** *** 635,639 **** CharCptr theMetaTypeName; AllocatorPtr theFactoryAllocator; - }; } --- 688,691 ---- |