6#ifndef _ZFI_ZFCallbackSerializable_h_
7#define _ZFI_ZFCallbackSerializable_h_
60typedef
zfbool (*_ZFP_ZFCallbackSerializeCustomCallback)(
66extern
ZFLIB_ZFCore void _ZFP_ZFCallbackSerializeCustomTypeRegister(
68 ,
ZF_IN _ZFP_ZFCallbackSerializeCustomCallback serializeCallback
71extern
ZFLIB_ZFCore _ZFP_ZFCallbackSerializeCustomCallback _ZFP_ZFCallbackSerializeCustomTypeForName(
ZF_IN const
zfstring &customType);
92#define ZFCALLBACK_SERIALIZE_TYPE_DEFINE(registerSig, type) \
93 static zfbool _ZFP_ZFCallbackSerializeCustom_##registerSig(ZF_IN_OUT ZFCallback &ret, \
94 ZF_IN const ZFSerializableData &serializableData, \
95 ZF_OUT_OPT zfstring *outErrorHint , \
96 ZF_OUT_OPT ZFSerializableData *outErrorPos ); \
97 ZF_GLOBAL_INITIALIZER_INIT_WITH_LEVEL(ZFCallbackSerializeCustomTypeReg_##registerSig, ZFLevelZFFrameworkNormal) { \
98 _ZFP_ZFCallbackSerializeCustomTypeRegister(type, _ZFP_ZFCallbackSerializeCustom_##registerSig); \
100 ZF_GLOBAL_INITIALIZER_DESTROY(ZFCallbackSerializeCustomTypeReg_##registerSig) { \
101 _ZFP_ZFCallbackSerializeCustomTypeUnregister(type); \
103 ZF_GLOBAL_INITIALIZER_END(ZFCallbackSerializeCustomTypeReg_##registerSig) \
104 static zfbool _ZFP_ZFCallbackSerializeCustom_##registerSig(ZF_IN_OUT ZFCallback &ret, \
105 ZF_IN const ZFSerializableData &serializableData, \
106 ZF_OUT_OPT zfstring *outErrorHint , \
107 ZF_OUT_OPT ZFSerializableData *outErrorPos )
#define ZFSerializableKeyword_ZFCallback_callbackType
keyword for serialize
Definition ZFCallbackSerializable.h:50
#define ZFSerializableKeyword_ZFCallback_method
keyword for serialize
Definition ZFCallbackSerializable.h:47
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define ZF_OUT_OPT
dummy macro that shows the param used as optional output
Definition ZFCoreTypeDef_ClassType.h:196
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:200
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define ZFOUTPUT_TYPE(T_Type, outputAction)
declare your custom type conversion to string, convenient for debug
Definition ZFCoreTypeDef_OtherType.h:221
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define ZFTYPEID_DECLARE(ZFLIB_, TypeName, Type)
register a type for reflection
Definition ZFTypeIdDeclare.h:137
#define ZFTYPEID_REG(ZFLIB_, TypeName, Type,...)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:151
callback used by ZFFramework
Definition ZFCallback.h:98
abstract base class, use ZFOutput or ZFInput
Definition ZFIOCallback_fwd.h:62
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
general output callback
Definition ZFIOCallback_output.h:37
ZFSerializable's data container, see ZFSerializable.
Definition ZFSerializableData.h:74