ZFFramework
 
Loading...
Searching...
No Matches
ZFProperty Class Reference

info for a property for ZFObject, see ZFPROPERTY_RETAIN for more info More...

#include <ZFProperty.h>

Public Member Functions

void objectInfoT (zfstring &ret) const
 see objectInfo
 
zfstring objectInfo (void) const
 get info about this property
 
zfidentity propertyId (void) const
 internal property id, for debug use only
 
zfbool isUserRegister (void) const
 true if this property is registered by ZFPropertyUserRegisterRetain
 
zfbool isDynamicRegister (void) const
 true if this property is registered by ZFPropertyDynamicRegister
 
zfany dynamicRegisterUserData (void) const
 see ZFPropertyDynamicRegister
 
zfbool propertySerializable (void) const
 true if the property is serializable
 
const ZFClassownerClass (void) const
 get the property's owner class
 
const zfstringpropertyName (void) const
 name for the property
 
const zfstringpropertyTypeName (void) const
 type string for the property
 
const zfstringpropertyTypeId (void) const
 type id string declared in ZFPROPERTY_XXX
 
const ZFMethodsetterMethod (void) const
 get the getter method
 
const ZFMethodgetterMethod (void) const
 get the getter method
 
zfbool isRetainProperty (void) const
 true if the property is retain property
 
const ZFClasspropertyClassOfRetainProperty (void) const
 for retain property only, get the retain property's declared class
 
zfbool isInternal (void) const
 whether the property is internal property
 
zfbool isInternalPrivate (void) const
 whether the property is internal private property
 

Public Attributes

ZFPropertyCallbackIsValueAccessed callbackIsValueAccessed
 see ZFPropertyCallbackIsValueAccessed
 
ZFPropertyCallbackIsInitValue callbackIsInitValue
 see ZFPropertyCallbackIsInitValue
 
ZFPropertyCallbackValueReset callbackValueReset
 see ZFPropertyCallbackValueReset
 
ZFPropertyCallbackUserRegisterInitValueSetup callbackUserRegisterInitValueSetup
 see ZFPropertyUserRegisterAssign
 
ZFPropertyCallbackDynamicRegisterInitValueGetter callbackDynamicRegisterInitValueGetter
 see ZFPropertyDynamicRegister
 

Detailed Description

info for a property for ZFObject, see ZFPROPERTY_RETAIN for more info

Member Function Documentation

◆ propertySerializable()

zfbool ZFProperty::propertySerializable ( void ) const

true if the property is serializable

property are serializable except:

Note
this property would be calculated at runtime, take care of performance

◆ propertyTypeName()

const zfstring & ZFProperty::propertyTypeName ( void ) const
inline

type string for the property

note the type string is the macro expand from the type, it may or may not be same for same type, usually for debug use only

◆ propertyTypeId()

const zfstring & ZFProperty::propertyTypeId ( void ) const
inline

type id string declared in ZFPROPERTY_XXX

this value should be ensured the type id for the type or ZFTypeId_none if no known type, this value is used for property's advanced serialize and copy logic, see ZFTypeInfo

Note
for retain property, this value is always the class name of the propertyClassOfRetainProperty

◆ isRetainProperty()

zfbool ZFProperty::isRetainProperty ( void ) const
inline

true if the property is retain property

note that bool property is also a assign property, it also have a getter method named "propertyName"

◆ propertyClassOfRetainProperty()

const ZFClass * ZFProperty::propertyClassOfRetainProperty ( void ) const
inline

for retain property only, get the retain property's declared class

note it's the declared class, property's value may be subclass of it

◆ isInternal()

zfbool ZFProperty::isInternal ( void ) const
inline

whether the property is internal property

properties would be treated as internal if:

  • property name starts with '_'
  • getter method is not public

internal properties would be ignored from serialization, see also isInternalPrivate

◆ isInternalPrivate()

zfbool ZFProperty::isInternalPrivate ( void ) const
inline

whether the property is internal private property

properties would be treated as internal private if:

  • property name starts with 'ZFP'
  • getter method is private

internal private properties would be ignored from serialization and reflection, see also isInternal


The documentation for this class was generated from the following file: