serializable interface More...
Go to the source code of this file.
Classes | |
class | ZFSerializable |
base class of call serializable object More... | |
Macros | |
#define | ZFSerializableKeyword_styleKey |
keyword for ZFSerializable to hold style, see ZFStyleSet | |
#define | ZFSerializableKeyword_serializableNewInstanceId |
used for ZFSerializable to override default constructor | |
#define | ZFSerializableKeyword_serializableNewInstance |
see ZFSerializableKeyword_serializableNewInstanceId | |
#define | ZFTOKEN_ZFSerializablePropertyTypeUnspecified |
string tokens | |
#define | ZFTOKEN_ZFSerializablePropertyTypeNotSerializable |
string tokens | |
#define | ZFTOKEN_ZFSerializablePropertyTypeSerializable |
string tokens | |
#define | ZFTOKEN_ZFSerializablePropertyTypeEmbeded |
string tokens | |
Enumerations | |
enum | ZFSerializablePropertyType { ZFSerializablePropertyTypeUnspecified , ZFSerializablePropertyTypeNotSerializable , ZFSerializablePropertyTypeSerializable , ZFSerializablePropertyTypeEmbeded } |
serializable property type, see ZFSerializable::serializableOnCheckPropertyType More... | |
Functions | |
zfbool | ZFObjectIsSerializable (ZFObject *obj) |
true if object is serializable | |
zfbool | ZFObjectFromDataT (zfauto &result, const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull) |
convenient method to ZFSerializable::serializeFromData | |
zfauto | ZFObjectFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull) |
see ZFObjectFromDataT | |
zfbool | ZFObjectToDataT (ZFSerializableData &serializableData, ZFObject *obj, zfstring *outErrorHint=zft_zfnull, ZFSerializable *refOwner=zft_zfnull) |
see ZFObjectFromDataT | |
ZFSerializableData | ZFObjectToData (ZFObject *obj, zfbool *outSuccess=zft_zfnull, zfstring *outErrorHint=zft_zfnull, ZFSerializable *refOwner=zft_zfnull) |
see ZFObjectFromDataT | |
zfbool | ZFObjectFromStringT (zfauto &result, const ZFClass *cls, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull) |
convenient method to ZFSerializable::serializeFromString | |
zfauto | ZFObjectFromString (const ZFClass *cls, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull) |
see ZFObjectFromStringT | |
zfbool | ZFObjectToStringT (zfstring &ret, ZFObject *obj, zfstring *errorHint=zft_zfnull) |
see ZFObjectFromStringT | |
zfstring | ZFObjectToString (ZFObject *obj, zfstring *errorHint=zft_zfnull) |
see ZFObjectFromStringT | |
zfbool | ZFObjectFromStringOrDataT (zfauto &result, const ZFClass *cls, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull) |
convenient method to ZFObjectFromString or ZFObjectFromData | |
zfauto | ZFObjectFromStringOrData (const ZFClass *cls, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull) |
see ZFObjectFromStringOrDataT | |
zfbool | ZFObjectToStringOrDataT (zfstring &ret, ZFObject *obj, zfstring *errorHint=zft_zfnull) |
see ZFObjectFromStringOrDataT | |
zfstring | ZFObjectToStringOrData (ZFObject *obj, zfstring *errorHint=zft_zfnull) |
see ZFObjectFromStringOrDataT | |
serializable interface
#define ZFSerializableKeyword_serializableNewInstanceId |
used for ZFSerializable to override default constructor
by default, serializable would be created by ZFClass::newInstance while serializing from data, you may supply this method to override:
the method should be supplied as ZFMethod
the method should return a newly created object, or retain your existing singleton instance
typically this method is used to achieve some singleton logic
serializable property type, see ZFSerializable::serializableOnCheckPropertyType
Enumerator | |
---|---|
ZFSerializablePropertyTypeUnspecified | |
ZFSerializablePropertyTypeNotSerializable | |
ZFSerializablePropertyTypeSerializable | |
ZFSerializablePropertyTypeEmbeded |
true if object is serializable
note that null is treated as serializable
|
extern |
convenient method to ZFSerializable::serializeFromData