ZFFramework
Loading...
Searching...
No Matches
Dynamic class/method/property register

unlike other C++ framework use static template specialization to achieve reflection, ZFFramework use fully dynamic way to achieve reflection, this may cause less performance, but are much more convenient for high level app coding

example:

"ZFDynamic()"
":classBegin('MyClass', 'ZFUIView')"
" :property(ZFTypeId_zfstring(), 'myProp')"
":classEnd()"
);
zfauto ZFLuaExecute(const ZFInput &input)
main entry for lua module, execute lua code

as you can see, we are able to register class/method/property in script language
further more, the registered contents can be combined with all other features in C++ world:

obj->invoke("myProp", zfobj<v_zfstring>("myValue"));
const ZFOutput & ZFOutputDefault(void)
default output callback, output source must be zfchar *string
zfbool ZFObjectToXml(const ZFOutput &outputCallback, ZFObject *obj, zfstring *outErrorHint=(0), const ZFXmlOutputToken &token=(ZFXmlOutputTokenDefault()))
util method to convert serializable object to xml format
zfauto newInstance(void) const
make a new instance of ZFObject dynamically, which is described by ZFClass
static const ZFClass * classForName(const zfchar *classNameOrFullName)
get class info by name
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:163