ZFFramework
|
common styleable object More...
#include <ZFStyleable.h>
Public Types | |
enum | |
Public Types inherited from ZFObject | |
enum | |
Public Member Functions | |
virtual const ZFClass * | classData (void) |
get instance's class info | |
Public Member Functions inherited from ZFObject | |
zfindex | objectRetainCount (void) |
return the object's retain count | |
ZFObjectHolder * | objectHolder (void) |
return an object holder that hold this object without affecting retain count | |
virtual void | objectInfoOfInstanceT (zfstring &ret) |
see objectInfoOfInstance | |
virtual zfstring | objectInfoOfInstance (void) |
return a short string describe the object instance | |
virtual void | objectInfoT (zfstring &ret) |
see objectInfo | |
virtual zfstring | objectInfo (void) |
return object info | |
virtual zfidentity | objectHash (void) |
get hash of this object | |
virtual ZFCompareResult | objectCompare (ZFObject *anotherObj) |
compare with anotherObj | |
virtual zfbool | equalTo (ZFObject *anotherObj) |
util to objectCompare | |
virtual zfauto | invoke (const zfchar *methodName) |
util method to perform ZFDI_invoke, do nothing if fail | |
virtual zfauto | invoke (const zfchar *methodName, ZFObject *param0, ZFObject *param1=((ZFObject *const &) _ZFP_ZFMethodGenericInvokerDefaultParamRef), ZFObject *param2=((ZFObject *const &) _ZFP_ZFMethodGenericInvokerDefaultParamRef), ZFObject *param3=((ZFObject *const &) _ZFP_ZFMethodGenericInvokerDefaultParamRef), ZFObject *param4=((ZFObject *const &) _ZFP_ZFMethodGenericInvokerDefaultParamRef), ZFObject *param5=((ZFObject *const &) _ZFP_ZFMethodGenericInvokerDefaultParamRef), ZFObject *param6=((ZFObject *const &) _ZFP_ZFMethodGenericInvokerDefaultParamRef), ZFObject *param7=((ZFObject *const &) _ZFP_ZFMethodGenericInvokerDefaultParamRef)) |
util method to perform ZFDI_invoke, do nothing if fail | |
virtual zfauto | invokeDetail (const zfchar *methodName, const ZFCoreArray< zfauto > ¶ms, zfbool *success=0, zfstring *errorHint=0) |
util method to perform ZFDI_invoke, do nothing if fail | |
zfbool | objectTagExist (void) |
see objectTag, true if this object has tag, and tag can be checked by objectTagGetAllKeyValue | |
void | objectTag (const zfchar *key, ZFObject *tag) |
used to hold a object for app's use, auto retained | |
zfany | objectTag (const zfchar *key) |
see objectTag | |
void | objectTagGetAllKeyValue (ZFCoreArray< zfstring > &allKey, ZFCoreArray< zfauto > &allValue) |
get all key value | |
void | objectTagRemove (const zfchar *key) |
remove tag, same as set tag to null | |
zfauto | objectTagRemoveAndGet (const zfchar *key) |
remove tag, return removed tag or null if not exist | |
void | objectTagRemoveAll (void) |
remove all tag | |
void | observerAdd (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
see observerNotify | |
void | observerAddForOnce (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
see observerNotify | |
void | observerRemove (zfidentity eventId, const ZFListener &callback) |
see observerNotify | |
void | observerRemoveAll (zfidentity eventId) |
see observerNotify | |
void | observerRemoveAll (void) |
see observerNotify | |
zfbool | observerHasAdd (void) |
true if any observer has been added | |
zfbool | observerHasAdd (zfidentity eventId) |
true if any observer with eventId has been added | |
void | observerNotify (zfidentity eventId, ZFObject *param0=0, ZFObject *param1=0) |
notify the observer with eventId | |
void | observerNotifyWithSender (ZFObject *customSender, zfidentity eventId, ZFObject *param0=0, ZFObject *param1=0) |
see observerNotify | |
ZFObserver & | observerHolder (void) |
access the internal observer holder | |
ZFObjectInstanceState | objectInstanceState (void) |
object instance's state | |
virtual zfbool | objectIsInternal (void) |
whether this object is internal object or its class is ZFClass::classIsInternal | |
virtual zfbool | objectIsInternalPrivate (void) |
whether this object is internal private object or its class is ZFClass::classIsInternalPrivate | |
ZFV | zfv (void) |
see ZFV | |
Public Member Functions inherited from ZFStyleable | |
virtual zfanyT< ZFStyleable > | defaultStyle (void) |
return default style of this instance | |
void | styleableCopyFrom (ZFStyleable *anotherStyleable) |
copy style from another styleable, see ZFStyleable | |
virtual zfbool | styleableIsDefaultStyle (void) |
true if this object is defaultStyle | |
void | styleKey (const zfchar *styleKey) |
see ZFStyleSet | |
const zfchar * | styleKey (void) |
see ZFStyleSet | |
void | styleKeyForProperty (const zfchar *propertyName, const zfchar *styleKey) |
see ZFStyleSet | |
const zfchar * | styleKeyForProperty (const zfchar *propertyName) |
see ZFStyleSet | |
void | styleKeyForProperty (const ZFProperty *property, const zfchar *styleKey) |
see ZFStyleSet | |
const zfchar * | styleKeyForProperty (const ZFProperty *property) |
see ZFStyleSet | |
Public Member Functions inherited from ZFInterface | |
virtual ZFObject * | toObject (void)=0 |
convert to ZFObject type | |
Public Member Functions inherited from ZFSerializable | |
zfbool | serializable (void) |
true if object is currently serializable, see ZFSerializable | |
zfbool | serializeFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0) |
serialize from data, see ZFSerializable | |
zfbool | serializeToData (ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializable *referencedOwnerOrNull=0) |
serialize to data, see ZFSerializable | |
zfbool | serializeFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0) |
serialize from string, return false by default | |
zfbool | serializeToString (zfstring &ret, zfstring *errorHint=0) |
see serializeFromString | |
void | serializableGetAllSerializablePropertyT (ZFCoreArray< const ZFProperty * > &ret) |
see serializableGetAllSerializableProperty | |
ZFCoreArray< const ZFProperty * > | serializableGetAllSerializableProperty (void) |
get all serializable property, usually for debug only, see serializableOnCheckPropertyType | |
void | serializableGetAllSerializableEmbededPropertyT (ZFCoreArray< const ZFProperty * > &ret) |
see serializableGetAllSerializableEmbededProperty | |
ZFCoreArray< const ZFProperty * > | serializableGetAllSerializableEmbededProperty (void) |
get all serializable embeded property, usually for debug only, see serializableOnCheckPropertyType | |
virtual void | serializableInfoT (zfstring &ret) |
get info as a serializable | |
virtual zfstring | serializableInfo (void) |
see serializableInfoT | |
Public Member Functions inherited from ZFCopyable | |
zfautoT< ZFCopyable > | copy (void) |
return a copy of this object | |
void | copyFrom (ZFObject *anotherObj) |
see copy, anotherObj must be same type as this object (by classData), otherwise, do nothing | |
Static Public Member Functions | |
static const ZFClass * | ClassData (void) |
get class info | |
Static Public Member Functions inherited from ZFObject | |
static const ZFClass * | ClassData (void) |
get class info | |
static zfidentity | EventObjectBeforeAlloc (void) |
see ZFObject::observerNotify | |
static zfidentity | EventObjectAfterAlloc (void) |
see ZFObject::observerNotify | |
static zfidentity | EventObjectBeforeDealloc (void) |
see ZFObject::observerNotify | |
static zfidentity | EventObjectPropertyValueOnUpdate (void) |
see ZFObject::observerNotify | |
Static Public Member Functions inherited from ZFStyleable | |
static const ZFClass * | ClassData (void) |
get class info | |
Static Public Member Functions inherited from ZFInterface | |
static const ZFClass * | ClassData (void) |
get class info | |
Static Public Member Functions inherited from ZFSerializable | |
static const ZFClass * | ClassData (void) |
get class info | |
Static Public Member Functions inherited from ZFCopyable | |
static const ZFClass * | ClassData (void) |
get class info | |
Protected Types | |
typedef ZFObject | zfsuper |
class ref to super | |
typedef ZFStyleableObject | zfself |
class ref to self | |
Protected Types inherited from ZFObject | |
typedef _ZFP_Obj_Base | zfsuper |
class ref to super | |
typedef ZFObject | zfself |
class ref to self | |
Protected Types inherited from ZFStyleable | |
enum | PropertyType { PropertyTypeNotStyleable , PropertyTypeNormal , PropertyTypeStyleable , PropertyTypeCopyable } |
see ZFStyleable::styleableOnCheckPropertyType More... | |
typedef ZFInterface | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFStyleable | zfself |
typedef for self | |
Protected Types inherited from ZFInterface | |
typedef _ZFP_ObjI_Base | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFInterface | zfself |
typedef for self | |
Protected Types inherited from ZFSerializable | |
typedef ZFInterface | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFSerializable | zfself |
typedef for self | |
Protected Types inherited from ZFCopyable | |
typedef ZFInterface | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFCopyable | zfself |
typedef for self | |
Protected Member Functions | |
virtual void | copyableOnCopyFrom (ZFObject *anotherObj) |
called by copy to copy contents from anotherObj | |
Protected Member Functions inherited from ZFObject | |
virtual void | objectInfoOnAppend (zfstring &ret) |
called by objectInfoT to append object info as a chain | |
virtual void | observerOnAdd (zfidentity eventId) |
called when add first observer | |
virtual void | observerOnRemove (zfidentity eventId) |
called when remove last observer | |
virtual void | observerOnEvent (const ZFArgs &zfargs) |
notified when observerNotify | |
virtual void | objectOnInit (void) |
override this to init your object | |
virtual void | objectOnInitFinish (void) |
called after objectOnInit, safe to call virtual functions here | |
virtual void | objectOnDeallocPrepare (void) |
called before objectOnDealloc, safe to call virtual functions here | |
virtual void | objectOnDealloc (void) |
override this to destroy your object | |
virtual void | objectOnRetain (void) |
called to retain object | |
virtual void | objectOnRelease (void) |
called to release object | |
virtual void | objectPropertyValueOnUpdate (const ZFProperty *property, const void *oldValue) |
see EventObjectPropertyValueOnUpdate | |
Protected Member Functions inherited from ZFStyleable | |
virtual ZFStyleable::PropertyType | styleableOnCheckPropertyType (const ZFProperty *property) |
check property type | |
virtual void | styleableOnCopyPropertyFrom (ZFStyleable *anotherStyleable, const ZFProperty *property, ZFStyleable::PropertyType propertyType) |
copy property with styleable logic | |
virtual void | styleableOnCopyFrom (ZFStyleable *anotherStyleable) |
for subclass to achieve custom style copy step, called by styleableCopyFrom, see ZFStyleable | |
Protected Member Functions inherited from ZFSerializable | |
virtual ZFSerializablePropertyType | serializableOnCheckPropertyType (const ZFProperty *property) |
check the property type that serializable should do what while serializing | |
virtual zfbool | serializableOnCheck (void) |
see serializable | |
virtual zfbool | serializableOnSerializeFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0) |
for serializable data that has "category" attribute, ZFSerializable would ignore it and leave it to subclass to resolve, see ZFSerializable | |
virtual zfbool | serializableOnSerializeToData (ZFSerializableData &serializableData, ZFSerializable *referencedOwnerOrNull, zfstring *outErrorHint=0) |
corresponding to serializableOnSerializeFromData, return whether the task is success, see ZFSerializable | |
virtual zfbool | serializableOnSerializePropertyFromData (const ZFSerializableData &propertyData, const ZFProperty *property, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializePropertyToData (ZFSerializableData &ownerData, const ZFProperty *property, ZFSerializable *referencedOwnerOrNull, zfstring *outErrorHint=0) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializeEmbededPropertyFromData (const ZFSerializableData &propertyData, const ZFProperty *property, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializeEmbededPropertyToData (ZFSerializableData &ownerData, const ZFProperty *property, ZFSerializable *referencedOwnerOrNull, zfstring *outErrorHint=0) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializeFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0) |
see serializeFromString | |
virtual zfbool | serializableOnSerializeToString (zfstring &ret, zfstring *errorHint=0) |
see serializeFromString | |
common styleable object
implement ZFStyleable, ZFSerializable, ZFCopyable
every style, serialize and copy logic has been done by reflect, if all of your properties are declared as ZFProperty
|
inlinevirtual |
get instance's class info
Reimplemented from ZFObject.
Reimplemented in ZFCompressLevel, v_ZFCurve, ZFJsonType, v_ZFJsonOutputToken, v_ZFJson, ZFRegExpOption, v_ZFRegExpOptionFlags, v_ZFRegExpResult, v_ZFTextTemplateRunParam, ZFTextTemplateIndexFlag, v_ZFTextTemplateIndexData, v_ZFTextTemplateParam, ZFXmlType, v_ZFXml, v_ZFXmlOutputToken, v_ZFDynamic, ZFFileOpenOption, v_ZFFileOpenOptionFlags, v_ZFFileFindData, ZFLogLevel, v_ZFCallback, v_ZFListener, v_ZFIOCallback, v_ZFOutput, v_ZFInput, v_ZFClassInstanceObserverAddParam, v_ZFClass, ZFEnum, v_ZFMethod, v_ZFProperty, v_zfbool, v_zfbyte, v_zfchar, v_zfstring, v_cString, v_ZFPtr, v_ZFPtrConst, v_zfint, v_zfuint, v_zfindex, v_zffloat, v_zfdouble, v_zflongdouble, v_zftimet, v_zfflags, v_zfidentity, v_ZFCompareResult, v_ZFSeekPos, v_ZFIndexRange, v_ZFLevel, v_ZFFrameworkState, v_ZFFuncAddrType, v_zfiterator, v_ZFBuffer, v_ZFCallerInfo, v_ZFIdentityGenerator, v_ZFFilterType, v_ZFFilterCallbackResult, v_ZFFilterForNumber, v_ZFFilterForIndex, v_ZFFilterForIdentity, v_ZFFilterForString, v_ZFPathInfo, v_ZFTokenForContainer, v_ZFTokenForKeyValueContainer, v_ZFClassDataChangeType, v_ZFClassDataChangeData, v_ZFFilterForZFClassType, v_ZFMethodPrivilegeType, v_ZFMethodType, v_ZFMethodParamDefaultValueCallback, v_ZFArgs, v_ZFObserver, v_ZFFilterForZFClass, v_ZFFilterForZFMethod, v_ZFFilterForZFProperty, v_ZFFilterForZFObject, v_ZFMethodGenericInvoker, v_ZFMethodDynamicRegisterParam, v_ZFMP, v_ZFPropertyCallbackDynamicRegisterInitValueGetter, v_ZFPropertyDynamicRegisterParam, v_ZFComparer_ZFObject, v_ZFObjectInstanceState, v_ZFCallbackType, v_ZFSerializableData, v_ZFCoreArray, ZFTypeIdWrapper, v_zfweak, v_ZFObserverGroupHolder, ZFOutputFormatStep, ZFOutputFormatBasic, ZFProtocolLevel, ZFProtocolInstanceState, v_ZFProtocol, v_ZFProtocolImplInfo, ZFResultType, ZFStringEncoding, ZFStyleList, v_ZFTimeValue, v_ZFTimeInfo, ZFHttpMethod, ZFHttpRequest, ZFTcpType, v_ZFUdpAddr, ZFUIImageImplNinePatchPos, ZFAnimationNativeViewCurve, ZFAnimationNativeView, ZFEnvDeviceUIType, ZFUIDrawableView, ZFUIGlobalStyle, ZFUIImage, ZFUIImageView, ZFUIKeyAction, ZFUIKeyCode, ZFUIMouseAction, ZFUIMouseButton, ZFUINativeViewWrapper, ZFUIRootView, ZFUIScrollThumbDefault, ZFUIScrollViewState, ZFUIScrollView, ZFUITextEditKeyboardType, ZFUITextEditKeyboardReturnType, ZFUITextEditKeyboardReturnAction, ZFUITextEdit, ZFUITextView, v_ZFUIPoint, v_ZFUIMargin, v_ZFUISize, v_ZFUIRect, ZFUIAlign, v_ZFUIAlignFlags, ZFUIOrientation, v_ZFUIOrientationFlags, v_ZFUIColor, ZFUITextAppearance, ZFUITextTruncateMode, ZFUIContentScaleType, ZFUIView, v_ZFUIViewBlinkParam, v_ZFUIViewFocusNextParam, ZFUISizeType, v_ZFUISizeParam, ZFUILayoutParam, ZFUIViewChildLayer, ZFUITransform, v_ZFUITransformFlags, ZFUIWindowLevel, ZFUIWindow, ZFUIWebView, ZFUIAniImageData, ZFUIAniImageView, ZFUIAutoLayoutPos, v_ZFUIAutoLayoutRule, ZFUIAutoLayoutParam, ZFUIAutoLayout, ZFUIButtonState, ZFUIButton, ZFUIButtonBasic, ZFUIButtonCheckBox, ZFUIButtonGroupType, ZFUIButtonGroupArray, ZFUIButtonGroupBasic, ZFUIButtonRatio, ZFUIDialog, ZFUIFlowLayoutParam, ZFUIFlowLayout, ZFUIHintContentBasic, ZFUILinearLayoutParam, ZFUILinearLayout, ZFUIListAdapterArray, ZFUIListAdapterBasic, ZFUIListCell, v_ZFUIListCellUpdaterParam, ZFUIListCellUpdaterBasic, ZFUIListCellView, ZFUIListCellViewBasic, ZFUIListView, ZFUIOnScreenKeyboardAutoFitLayout, ZFUIPageResumeReason, ZFUIPagePauseReason, ZFUITextEditWidget, ZFUIViewLayout, ZFAniForImpl, ZFAniForGeneric, v_ZFAniBuilder, ZFAnimation, ZFAnimationGroup, and ZFAnimationTimeLine.
|
inlineprotectedvirtual |
called by copy to copy contents from anotherObj
anotherObj is ensured the same type as self, ensured not null, and ensured not same instance of this
by default this method would do nothing for performance, you may use ZFPropertyCopyAll to copy all properties for most case
Reimplemented from ZFCopyable.
Reimplemented in ZFEnum.