6#ifndef _ZFI_ZFObjectIO_h_
7#define _ZFI_ZFObjectIO_h_
94#define ZFOBJECTIO_DEFINE(registerSig, level, checkerAction, fromInputAction, toOutputAction) \
95 ZF_STATIC_REGISTER_INIT(ObjIOReg_##registerSig) { \
96 _ZFP_ZFObjectIORegister(zftext(#registerSig), zfself::_ZFP_checker, zfself::_ZFP_fromInput, zfself::_ZFP_toOutput, level); \
98 ZF_STATIC_REGISTER_DESTROY(ObjIOReg_##registerSig) { \
99 _ZFP_ZFObjectIOUnregister(zftext(#registerSig), zfself::_ZFP_checker, zfself::_ZFP_fromInput, zfself::_ZFP_toOutput); \
101 static zfbool _ZFP_checker( \
102 ZF_IN zfbool isOutput \
103 , ZF_IN const ZFPathInfo &pathInfo \
104 , ZF_IN const zfstring &fileName \
105 , ZF_IN const zfstring &fileExt \
109 static zfbool _ZFP_fromInput( \
111 , ZF_IN_OUT const ZFInput &input \
112 , ZF_OUT_OPT zfstring *outErrorHint = zfnull \
116 static zfbool _ZFP_toOutput( \
117 ZF_IN_OUT const ZFOutput &output \
118 , ZF_IN zfany const &obj \
119 , ZF_OUT_OPT zfstring *outErrorHint = zfnull \
123 ZF_STATIC_REGISTER_END(ObjIOReg_##registerSig)
125typedef zfbool (*_ZFP_ZFObjectIOCallback_checker)(
131typedef zfbool (*_ZFP_ZFObjectIOCallback_fromInput)(
136typedef zfbool (*_ZFP_ZFObjectIOCallback_toOutput)(
143 ,
ZF_IN _ZFP_ZFObjectIOCallback_checker checker
144 ,
ZF_IN _ZFP_ZFObjectIOCallback_fromInput fromInput
145 ,
ZF_IN _ZFP_ZFObjectIOCallback_toOutput toOutput
150 ,
ZF_IN _ZFP_ZFObjectIOCallback_checker checker
151 ,
ZF_IN _ZFP_ZFObjectIOCallback_fromInput fromInput
152 ,
ZF_IN _ZFP_ZFObjectIOCallback_toOutput toOutput
163#define ZFStyleDecoder_ZFObjectIO ZFObjectIO
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define ZF_OUT_OPT
dummy macro that shows the param used as optional output
Definition ZFCoreTypeDef_ClassType.h:192
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_OUT
dummy macro that shows the param used as required output
Definition ZFCoreTypeDef_ClassType.h:188
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
ZFLevel
level for logic which depends on order
Definition ZFLevel.h:17
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
zfauto ZFObjectIOLoad(const ZFInput &input, zfstring *outErrorHint=zft_zfnull)
high level object IO
zfbool ZFObjectIOSave(const ZFOutput &output, ZFObject *obj, zfstring *outErrorHint=zft_zfnull)
see ZFObjectIOLoad
zfbool ZFObjectIOLoadT(zfauto &ret, const ZFInput &input, zfstring *outErrorHint=zft_zfnull)
see ZFObjectIOLoad
base class of all objects
Definition ZFObjectCore.h:209
general output callback
Definition ZFIOCallback_output.h:37
path related info storage for impl, actual meaning of the info depends on impl
Definition ZFPathInfo.h:35
util method to cast ZFObject types freely
Definition zfany.h:35
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34