utility for ZFProperty More...
#include "ZFObjectUtil.h"
Go to the source code of this file.
Functions | |
zfbool | ZFPropertyIsValueAccessed (const ZFProperty *propertyInfo, zfany const &ownerObj) |
util for ZFPropertyCallbackIsValueAccessed | |
zfbool | ZFPropertyIsInitValue (const ZFProperty *propertyInfo, zfany const &ownerObj) |
util for ZFPropertyCallbackIsInitValue | |
zfauto | ZFPropertyGetInitValue (const ZFProperty *propertyInfo, zfany const &ownerObj) |
util for ZFPropertyCallbackIsInitValue | |
void | ZFPropertyValueReset (const ZFProperty *propertyInfo, zfany const &ownerObj) |
util for ZFPropertyCallbackValueReset | |
ZFCompareResult | ZFPropertyCompare (const ZFProperty *propertyInfo, ZFObject *obj0, ZFObject *obj1) |
util to compare property value | |
ZFCompareResult | ZFPropertyCompareValue (const ZFProperty *propertyInfo, ZFObject *obj0, ZFObject *obj1) |
util to compare property value | |
void | ZFPropertyCopy (const ZFProperty *propertyInfo, ZFObject *dstObj, ZFObject *srcObj) |
util to copy property between object | |
void | ZFPropertyCopyAll (ZFObject *dstObj, ZFObject *srcObj) |
copy all properties from srcObj to dstObj | |
zfbool | ZFPropertyAllEqual (ZFObject *obj0, ZFObject *obj1) |
compare all properties of obj0 with obj1's property by reflect | |
void | ZFObjectPropertyInfoT (zfstring &ret, ZFObject *obj, zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) |
use reflect to print all property if the property is not ZFPropertyIsInitValue | |
zfstring | ZFObjectPropertyInfo (ZFObject *obj, zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) |
see ZFObjectPropertyInfoT | |
void | ZFObjectVerboseInfoT (zfstring &ret, ZFObject *obj, zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) |
print verbose info about the object, using ZFObjectPropertyInfoT | |
zfstring | ZFObjectVerboseInfo (ZFObject *obj, zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) |
see ZFObjectVerboseInfoT | |
void | ZFObjectPrettyInfoT (zfstring &ret, ZFObject *obj, zfindex maxCount=((zfindex) -1)) |
print pretty info about the object, using ZFObjectPropertyInfoT | |
zfstring | ZFObjectPrettyInfo (ZFObject *obj, zfindex maxCount=((zfindex) -1)) |
see ZFObjectPrettyInfoT | |
void | ZFObjectShortInfoT (zfstring &ret, ZFObject *obj, zfindex maxCount=((zfindex) -1)) |
print short info about the object, using ZFObjectPropertyInfoT | |
zfstring | ZFObjectShortInfo (ZFObject *obj, zfindex maxCount=((zfindex) -1)) |
see ZFObjectShortInfoT | |
utility for ZFProperty
copy all properties from srcObj to dstObj
this function would go through all properties in dstObj, then search whether there are same property in srcObj, if there are, copy them from srcObj to dstObj by the reflectable getter and setter
search is done by property's name compare and type compare, and type is compared by ZFProperty::propertyTypeId
it's your responsibility to make sure the copy is valid
by default, these properties would be ignored:
compare all properties of obj0 with obj1's property by reflect
if both object is null, return true
two object have no need to be same class, but must be ensured that all property are safe to be compared, i.e. each property's type must match
|
extern |
use reflect to print all property if the property is not ZFPropertyIsInitValue
result looks like:
|
extern |
print verbose info about the object, using ZFObjectPropertyInfoT
result looks like:
|
extern |
print pretty info about the object, using ZFObjectPropertyInfoT
result looks like: