ZFFramework
|
#include "zfany.h"
Go to the source code of this file.
Macros | |
#define | zfsuperI(T_SuperType) |
class ref to proper super type, see ZFObject for more info | |
#define | ZFOBJECT_DECLARE(ChildClass, SuperClass, ...) |
necessary for every class inherit from ZFObject | |
#define | ZFOBJECT_DECLARE_WITH_CUSTOM_CTOR(ChildClass, SuperClass, ...) |
declare object which allow custom constructor | |
#define | ZFOBJECT_DECLARE_ABSTRACT(ChildClass, SuperClass, ...) |
necessary for every abstract class inherit from ZFObject | |
#define | ZFOBJECT_DECLARE_ABSTRACT_WITH_CUSTOM_CTOR(ChildClass, SuperClass, ...) |
see ZFOBJECT_DECLARE_WITH_CUSTOM_CTOR | |
#define | ZFOBJECT_REGISTER(T_ZFObject, ...) |
register ZFObject to ZFClass map | |
#define | ZFOBJECT_PRIVATE_ALLOC(...) |
mark this object can not be allocated directly | |
#define | ZFOBJECT_ON_INIT_INLINE_1(ZFMP_0) |
util macro for subclass to declare ZFObject::objectOnInit as ZFMethod | |
#define | ZFOBJECT_ON_INIT_DECLARE_1(ZFMP_0) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_1(OwnerClass, ZFMP_0) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_INLINE_2(ZFMP_0, ZFMP_1) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DECLARE_2(ZFMP_0, ZFMP_1) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_2(OwnerClass, ZFMP_0, ZFMP_1) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_INLINE_3(ZFMP_0, ZFMP_1, ZFMP_2) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DECLARE_3(ZFMP_0, ZFMP_1, ZFMP_2) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_3(OwnerClass, ZFMP_0, ZFMP_1, ZFMP_2) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_INLINE_4(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DECLARE_4(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_4(OwnerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_INLINE_5(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DECLARE_5(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_5(OwnerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_INLINE_6(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DECLARE_6(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_6(OwnerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_INLINE_7(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DECLARE_7(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_7(OwnerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_INLINE_8(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6, ZFMP_7) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DECLARE_8(ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6, ZFMP_7) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_DEFINE_8(OwnerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6, ZFMP_7) |
see ZFOBJECT_ON_INIT_INLINE_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_1(methodInvokerAction, ownerClassSig, ZFMP_0) |
util macro to declare ZFObject::objectOnInit as ZFMETHOD_USER_REGISTER_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_2(methodInvokerAction, ownerClassSig, ZFMP_0, ZFMP_1) |
see ZFOBJECT_ON_INIT_USER_REGISTER_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_3(methodInvokerAction, ownerClassSig, ZFMP_0, ZFMP_1, ZFMP_2) |
see ZFOBJECT_ON_INIT_USER_REGISTER_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_4(methodInvokerAction, ownerClassSig, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3) |
see ZFOBJECT_ON_INIT_USER_REGISTER_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_5(methodInvokerAction, ownerClassSig, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4) |
see ZFOBJECT_ON_INIT_USER_REGISTER_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_6(methodInvokerAction, ownerClassSig, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5) |
see ZFOBJECT_ON_INIT_USER_REGISTER_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_7(methodInvokerAction, ownerClassSig, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6) |
see ZFOBJECT_ON_INIT_USER_REGISTER_1 | |
#define | ZFOBJECT_ON_INIT_USER_REGISTER_8(methodInvokerAction, ownerClassSig, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6, ZFMP_7) |
see ZFOBJECT_ON_INIT_USER_REGISTER_1 | |
#define | ZFObjectOnInitUserRegister_1(resultMethod, methodInvokerAction, ownerClass, ZFMP_0) |
util macro to declare ZFObject::objectOnInit as ZFMethodUserRegister_1 | |
#define | ZFObjectOnInitUserRegister_2(resultMethod, methodInvokerAction, ownerClass, ZFMP_0, ZFMP_1) |
see ZFObjectOnInitUserRegister_1 | |
#define | ZFObjectOnInitUserRegister_3(resultMethod, methodInvokerAction, ownerClass, ZFMP_0, ZFMP_1, ZFMP_2) |
see ZFObjectOnInitUserRegister_1 | |
#define | ZFObjectOnInitUserRegister_4(resultMethod, methodInvokerAction, ownerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3) |
see ZFObjectOnInitUserRegister_1 | |
#define | ZFObjectOnInitUserRegister_5(resultMethod, methodInvokerAction, ownerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4) |
see ZFObjectOnInitUserRegister_1 | |
#define | ZFObjectOnInitUserRegister_6(resultMethod, methodInvokerAction, ownerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5) |
see ZFObjectOnInitUserRegister_1 | |
#define | ZFObjectOnInitUserRegister_7(resultMethod, methodInvokerAction, ownerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6) |
see ZFObjectOnInitUserRegister_1 | |
#define | ZFObjectOnInitUserRegister_8(resultMethod, methodInvokerAction, ownerClass, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4, ZFMP_5, ZFMP_6, ZFMP_7) |
see ZFObjectOnInitUserRegister_1 | |
Functions | |
const ZFMethod * | ZFObjectOnInitDynamicRegister (const ZFClass *cls, const ZFMP &methodParam, const ZFListener &methodImpl, zfstring *errorHint=0) |
util to declare ZFObject::objectOnInit as ZFMethodDynamicRegister | |
const ZFMethod * | ZFObjectOnInitDynamicRegister (const ZFClass *cls, const ZFMethodDynamicRegisterParam ¶m, zfstring *errorHint=0) |
util to declare ZFObject::objectOnInit as ZFMethodDynamicRegister | |
ZFObject declaration.
#define ZFOBJECT_DECLARE | ( | ChildClass, | |
SuperClass, | |||
... ) |
#define ZFOBJECT_DECLARE_WITH_CUSTOM_CTOR | ( | ChildClass, | |
SuperClass, | |||
... ) |
declare object which allow custom constructor
by default, ZFObject declare constructor as protected so that app can't construct ZFObject on stack, you may use this macro instead of ZFOBJECT_DECLARE to allow user defined constructor
NOTE: never abuse this macro, and strongly recommended not to allow ZFObject create on stack (i.e. public constructors)
#define ZFOBJECT_DECLARE_ABSTRACT | ( | ChildClass, | |
SuperClass, | |||
... ) |
necessary for every abstract class inherit from ZFObject
for more information, please refer to ZFObject
#define ZFOBJECT_REGISTER | ( | T_ZFObject, | |
... ) |
register ZFObject to ZFClass map
usage:
you only need this if you want to use reflection, such as ZFClass::classForName
detailed:
ZFClass map is set up when YourClass::ClassData is called, which may occurred when:
this macro actually do only one thing: declare a static global variable to make sure YourClass::ClassData is called
so if you add it to cpp file, only one dummy global variable is defined
on the other hand, if you add it to h file, multiple dummy variables are defined, as more as the cpp files which include the h file
all ZFMethod and ZFProperty would also be registered automatically when it's owner class registered, for only one exception:
#define ZFOBJECT_PRIVATE_ALLOC | ( | ... | ) |
mark this object can not be allocated directly
usage:
when declared, the object can not be allocated by zfAlloc series directly, and can only be allocated by reflection (ZFClass::newInstance)
#define ZFOBJECT_ON_INIT_INLINE_1 | ( | ZFMP_0 | ) |
util macro for subclass to declare ZFObject::objectOnInit as ZFMethod
note: you must call this->objectOnInit();
before anything
#define ZFOBJECT_ON_INIT_USER_REGISTER_1 | ( | methodInvokerAction, | |
ownerClassSig, | |||
ZFMP_0 ) |
util macro to declare ZFObject::objectOnInit as ZFMETHOD_USER_REGISTER_1
note: you must not call this->objectOnInit();
#define ZFObjectOnInitUserRegister_1 | ( | resultMethod, | |
methodInvokerAction, | |||
ownerClass, | |||
ZFMP_0 ) |
util macro to declare ZFObject::objectOnInit as ZFMethodUserRegister_1
note: you must not call this->objectOnInit();
|
extern |
util to declare ZFObject::objectOnInit as ZFMethodDynamicRegister
note: you have no need to call invokerObject->objectOnInit();
|
extern |
util to declare ZFObject::objectOnInit as ZFMethodDynamicRegister
note: you have no need to call invokerObject->objectOnInit();