ZFFramework
Loading...
Searching...
No Matches
Declare your own object

to use ZFFramework's object, you must follow some rules:

zfclass MyObject : zfextend ParentObject {
ZFOBJECT_DECLARE(MyObject, ParentObject)
};
// in cpp files
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:124
#define ZFOBJECT_REGISTER(T_ZFObject)
register ZFObject to ZFClass map
Definition ZFObjectDeclare.h:202
  • use zfclass to show it's an ZFObject type
  • use zfextend to extend from a ZFObject or any other ZFObject type
  • use ZFOBJECT_DECLARE for necessary macro expansion
  • use ZFOBJECT_REGISTER to register your object, this is required if you want your object reflectable