#include <corelinux/AbstractAllocator.hpp>
#include <AbstractEntityException.hpp>
#include <corelinux/Iterator.hpp>
#include <cstdio>
Namespaces | |
namespace | corelinux |
Compounds | |
struct | __DispatchDescriptor |
struct | _InstanceMemberDescriptor |
class | corelinux::MetaType |
Defines | |
#define | __METATYPE_HPP |
#define | DECLARE_METATYPEMEMBERS( className ) |
define the metaType member for className. More... | |
#define | OPEN_METATYPE_PARENTS( className ) |
\ the MetaType descriptor \. More... | |
#define | DEFINE_METATYPE_PARENT( parentName ) |
\ array storing the parents descriptors \. More... | |
#define | CLOSE_METATYPE_PARENT |
\ parentName type descriptor \. More... | |
#define | _DECLARE_INSTANCEDATA_STATICS(dataName) |
Declare static members and methods for supporting type instance access by MetaType instance
| |
#define | DECLARE_INSTANCEDATA( type, dataName ) |
Declare data members that object instances expose by generating accessors and mutators
| |
#define | DECLARE_INSTANCEDATA_FROMBASE( type, dataName, baseType, baseClass ) |
\ Mutators \ Declare data members that object instances expose by generating accessors and mutators
| |
#define | _DEFINE_INSTANCE_STATICS( className, dataName ) |
\ Mutators \. More... | |
#define | DEFINE_INSTANCEDATA_DESCRIPTOR( className, type, dataName ) |
#define | DEFINE_CLASSINSTANCE_DESCRIPTOR( className, type, typeClass, dataName ) |
#define | OPEN_INSTANCEDATA( className ) |
Each attribute in a type can be exposed to it's MetaType for reasoning and access in the user space
| |
#define | DEFINE_INSTANCEDATA( className, dataName ) |
\ Array storing the attribute descriptors \ Creates the MemberDescriptor entry in the array
| |
#define | CLOSE_INSTANCEDATA |
\ Attribute descriptor \. More... | |
#define | DISPATCH_FUNCTION( className, methName ) |
Opens the standard header, body required to do something
| |
#define | DISPATCH_FUNCTION_NORETURN( className, methName ) |
Opens the standard header, body required to do something but ignores return value
| |
#define | DISPATCH_STATIC_FUNCTION( className, methName ) |
#define | CLOSE_DISPATCH_FUNCTION |
#define | DEFINE_DISPATCH_DESCRIPTOR( className, classMethName, methName ) |
Defines a dispatch descriptor for a specific call
| |
#define | DEFINE_DISPATCH_ENTRY( className, methName ) |
#define | OPEN_DISPATCH_TABLE( className ) |
#define | CLOSE_DISPATCH_TABLE |
#define | DEFINE_DUMMY_DISPATCHTABLE( className ) |
#define | _DEFINE_FACTORY( className ) |
Define the factory allocator.
| |
#define | _DEFINE_ENTITY(className) |
\ the className Allocator \ Defines the factory methods for the type. Define the create(), destroy() functions to create and destroy entities and also overload the new and delete operators which call create and destroy()
| |
#define | _DEFINE_ENTITY_WITH_FACTORY(className) |
#define | _DEFINE_ABSTRACT_ENTITY(className) |
\ redefine the operator delete for className\this operator use the className::destroy() \ function \
| |
#define | _DEFINE_ENTITY_ALWAYS_PARMS(className,identification,version,domain, description ) |
\ redefine the operator delete for className\this operator use the className::destroy() \ function \
| |
#define | _DEFINE_SINGLE_STRINGID( className ) |
\ construct the theTypeDesc \. More... | |
#define | _DEFINE_DUAL_STRINGID( className, metaName ) |
#define | _DEFINE_ENTITY_ALWAYS(className) |
#define | DEFINE_ABSTRACT_METATYPE( className, identifier, version, domain, description ) |
\ implements the equals upcalls \. More... | |
#define | DEFINE_ABSTRACT_METATYPE1( className, metaName, identifier, version, domain, description ) |
#define | DEFINE_METATYPE( className, identifier, version, domain, description ) |
#define | DEFINE_METATYPE_WITH_FACTORY( className, identifier, version, domain, description ) |
#define | DEFINE_METATYPE1( className, metaName, identifier, version, domain, description ) |
#define | DEFINE_METATYPE1_WITH_FACTORY( className, metaName, identifier, version, domain, description ) |
Typedefs | |
typedef void* (* | PfnGet )( corelinux::FrameworkEntityPtr ) |
\ The parent type descriptor array must be termined by the NULLPTR \. | |
typedef void (* | PfnSet )( corelinux::FrameworkEntityPtr, corelinux::VoidPtr ) |
typedef struct _InstanceMemberDescriptor | MemberDescriptor |
typedef struct _InstanceMemberDescriptor* | MemberDescriptorPtr |
typedef const MemberDescriptor* | MemberDescriptorCptr |
typedef MemberDescriptor& | MemberDescriptorRef |
typedef const MemberDescriptor& | MemberDescriptorCref |
typedef void (* | DispatchFunction )( corelinux::FrameworkEntityPtr, void **, void * ) |
\ Close the attribute descriptor array \. | |
typedef struct __DispatchDescriptor | DispatchDescriptor |
typedef struct __DispatchDescriptor* | DispatchDescriptorPtr |
typedef const DispatchDescriptor* | DispatchDescriptorCptr |
typedef DispatchDescriptor& | DispatchDescriptorRef |
typedef const DispatchDescriptor& | DispatchDescriptorCref |
|
Initializer: \ } |
|
Initializer: \ 0 } |
|
Initializer: \ \ MemberDescriptorCptr( NULLPTR ) \ }
|
|
Initializer: \ \ corelinux::MetaTypePtr(NULLPTR) \ }
|
|
Declare data members that object instances expose by generating accessors and mutators
def DECLARE_INSTANCEDATA( type, dataName ) |
|
\ Mutators \ Declare data members that object instances expose by generating accessors and mutators
def DECLARE_INSTANCEDATA_FROMBASE( type, dataName, baseType, baseClass ) |
|
Initializer: \ public: \ \ static corelinux::MetaTypePtr getTypeDescriptor( void ); \ \ virtual corelinux::MetaTypePtr getType( void ) const; \ \ virtual bool equals( corelinux::FrameworkEntityCptr ) const; \ \ static className##Ptr create( void ); \ \ static className##Ptr create( corelinux::UniversalIdentifierCref ); \ \ static void destroy( className##Ptr aPointer ); \ static className##Cptr castDown( corelinux::FrameworkEntityCptr ) ; \ static className##Ptr castDown( corelinux::FrameworkEntityPtr ); \ static className##Ref castDown( corelinux::FrameworkEntityRef ); \ static className##Cref castDown( corelinux::FrameworkEntityCref ); \ \ void * operator new(size_t aSize); \ \ void operator delete(void * aVoidPtr); \ protected: \ private: \ \ static corelinux::MetaType theTypeDesc;
This must be located within the class interface.
|
|
Initializer: \ _DEFINE_ABSTRACT_ENTITY( className ) \ _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_SINGLE_STRINGID(className) \ _DEFINE_ENTITY_ALWAYS(className) define a new abstract MetaType
|
|
Initializer: \ _DEFINE_ABSTRACT_ENTITY( className ) \ _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_DUAL_STRINGID(className,metaName) \ _DEFINE_ENTITY_ALWAYS(className) |
|
Initializer: \ _DEFINE_INSTANCE_STATICS(className,dataName) \ MemberDescriptor className::the##dataName##Descriptor = \ { \ #type, \ #dataName, \ sizeof(type), \ typeClass::getTypeDescriptor(), \ &className::get##dataName##AsVPtr, \ &className::set##dataName##AsVPtr \ } |
|
Initializer: \ static DispatchDescriptor className##Dispatch##methName = \ { #classMethName, className##methName }
|
|
Initializer: \ &className##Dispatch##methName, |
|
Initializer: \ static void className##ConstructImplicit \ ( \ corelinux::FrameworkEntityPtr, \ void **, \ void *ret \ ) \ { \ *((FrameworkEntityPtr *)ret) = className::create(); \ } \ static void className##DestructImplicit \ ( \ corelinux::FrameworkEntityPtr aClass, \ void **, \ void * \ ) \ { \ className##Ptr myPointer = className::castDown( aClass ); \ className::destroy( myPointer ); \ } \ static DispatchDescriptor className##Dispatch##ConstructImplicit = \ {"Construct",className##ConstructImplicit}; \ static DispatchDescriptor className##Dispatch##DestructImplicit = \ {"Destruct",className##DestructImplicit}; \ static DispatchDescriptor const *className##DispatchTable[] = \ { \ DEFINE_DISPATCH_ENTRY( className,ConstructImplicit ) \ DEFINE_DISPATCH_ENTRY( className,DestructImplicit ) \ 0 \ } |
|
Initializer: \ \ &className::the##dataName##Descriptor, \
|
|
Initializer: \ _DEFINE_INSTANCE_STATICS(className,dataName) \ MemberDescriptor className::the##dataName##Descriptor = \ { \ #type, \ #dataName, \ sizeof(type), \ NULLPTR, \ &className::get##dataName##AsVPtr, \ &className::set##dataName##AsVPtr \ } |
|
Initializer: \ _DEFINE_FACTORY( className ) \ _DEFINE_ENTITY( className ) \ _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_SINGLE_STRINGID(className) \ ,&the##className##Allocator \ _DEFINE_ENTITY_ALWAYS(className)
|
|
Initializer: \ _DEFINE_FACTORY( className ) \ _DEFINE_ENTITY( className ) \ _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_DUAL_STRINGID(className,metaName) \ ,&the##className##Allocator \ _DEFINE_ENTITY_ALWAYS(className)
|
|
Initializer: \ _DEFINE_ENTITY_WITH_FACTORY( className ) \ _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_DUAL_STRINGID(className,metaName) \ ,&the##className##Allocator \ _DEFINE_ENTITY_ALWAYS(className)
|
|
Initializer: \ \ parentName::getTypeDescriptor(), \
|
|
Initializer: \ _DEFINE_ENTITY_WITH_FACTORY( className ) \ _DEFINE_ENTITY_ALWAYS_PARMS(className,identifier,version,domain, description ) \ _DEFINE_SINGLE_STRINGID(className) \ ,&the##className##Allocator \ _DEFINE_ENTITY_ALWAYS(className)
|
|
Initializer: \ static void className##methName \ ( \ corelinux::FrameworkEntityPtr aClass, \ void **args, \ void *ret \ ) \ { \ className##Ptr myPointer = className::castDown( aClass );
|
|
Initializer: \ static void className##methName \ ( \ corelinux::FrameworkEntityPtr aClass, \ void **args, \ void * \ ) \ { \ className##Ptr myPointer = className::castDown( aClass );
|
|
Initializer: \ static void className##methName \ ( \ corelinux::FrameworkEntityPtr , \ void **args, \ void *ret \ ) \ { |
|
Initializer: \ static void className##ConstructImplicit \ ( \ corelinux::FrameworkEntityPtr, \ void **, \ void *ret \ ) \ { \ *((FrameworkEntityPtr *)ret) = className::create(); \ } \ static void className##DestructImplicit \ ( \ corelinux::FrameworkEntityPtr aClass, \ void **, \ void * \ ) \ { \ className##Ptr myPointer = className::castDown( aClass ); \ className::destroy( myPointer ); \ } \ static DispatchDescriptor className##Dispatch##ConstructImplicit = \ {"Construct",className##ConstructImplicit}; \ static DispatchDescriptor className##Dispatch##DestructImplicit = \ {"Destruct",className##DestructImplicit}; \ static DispatchDescriptor const *className##DispatchTable[] = \ { \ DEFINE_DISPATCH_ENTRY( className,ConstructImplicit ) \ DEFINE_DISPATCH_ENTRY( className,DestructImplicit ) |
|
Initializer: \ \ static MemberDescriptor const *className##Type##Members[] = \ { \
|
|
Initializer: \ \ corelinux::MetaType const * className##MetaType##Parents[] = \ { \
|
|
Initializer: \ static MemberDescriptor the##dataName##Descriptor; \ static void *get##dataName##AsVPtr( corelinux::FrameworkEntityPtr ); \ static void set##dataName##AsVPtr \ ( \ corelinux::FrameworkEntityPtr , \ corelinux::VoidPtr \ ); \
def _DECLARE_INSTANCEDATA_STATICS( dataName ) |
|
\ redefine the operator delete for className\this operator use the className::destroy() \ function \
|
|
Initializer: \ className##Name \ ,#metaName |
|
\ the className Allocator \ Defines the factory methods for the type. Define the create(), destroy() functions to create and destroy entities and also overload the new and delete operators which call create and destroy()
|
|
|
|
Initializer: \ \ MetaType className::theTypeDesc \ ( \ identification, \ version, \ className##Size, \ className##MetaType##Parents, \ className##Type##Members, \ className##DispatchTable, \ domain, \ description, \
calls the constructor of theTypeDesc and implements the getTypeDescriptor() and getType() functions |
|
|
|
Initializer: \ CORELINUX_DEFAULT_ALLOCATOR( className##Allocator, className ) \ \ static className##Allocator the##className##Allocator;
|
|
Initializer: \ void *className::get##dataName##AsVPtr \ ( \ corelinux::FrameworkEntityPtr aSelf \ ) \ { \ return \ castDown(aSelf)->get##dataName##AsVoidPtr(); \ } \ void className::set##dataName##AsVPtr \ ( \ corelinux::FrameworkEntityPtr aSelf, \ corelinux::VoidPtr aType \ ) \ { \ castDown(aSelf)->set##dataName##FromVPtr(aType); \ } \ Structure for managing use defined data members |
|
Initializer: \ className##Name \ ,MetaType##className##Name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\ Close the attribute descriptor array \.
|
|
|
|
|
|
|
|
|
|
|
|
\ The parent type descriptor array must be termined by the NULLPTR \.
|
|
|