ZFFramework
Loading...
Searching...
No Matches
Declare method and property

aside from normal method of C++ world, ZFFramework supplys enhanced method and property logic:

ZFOBJECT_DECLARE(MyObject)
// declare method
ZFMETHOD_INLINE_0(void, myMethod) {
// method contents here
}
// declare property
};
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define ZFMETHOD_INLINE_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:755
#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 ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:127
base class of all objects
Definition ZFObjectCore.h:214

once declared, you may use them as normal methods:

// call as normal method
obj->myMethod();
// get property value by normal method
zfstring value = obj->myProperty();
// set property value by normal method
obj->myProperty(value);

for advanced usage of method and property, see Reflection for more info