18#define ZFEnumInvalid() ((zfuint)-1)
22#define ZFEnumNameInvalid() _ZFP_ZFEnumNameInvalid()
192 return _ZFP_ZFEnum_value;
215 _ZFP_ZFEnum_value = value;
220 this->enumValue(value);
229 this->_ZFP_ZFEnum_value = refTmp->_ZFP_ZFEnum_value;
281 zfflagsToStringT(ret, enumClass, value, includeNotConverted, exclusiveMode, notConverted, separatorToken);
289 _ZFP_ZFEnumData(
void);
290 ~_ZFP_ZFEnumData(
void);
309 _ZFP_ZFEnumDataPrivate *d;
316 _ZFP_ZFEnumDataHolder(
ZF_IN const _ZFP_ZFEnumData *d)
320 _ZFP_ZFEnumDataHolder(
void) {
321 _ZFP_ZFEnumDataCleanup(d);
324 const _ZFP_ZFEnumData *d;
329 ,
ZF_IN const _ZFP_ZFEnumData *d
#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 zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfpurevirtual
dummy macro shows that a method is pure virtual method
Definition ZFCoreTypeDef_ClassType.h:68
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_OUT
dummy macro that shows the param used as required output
Definition ZFCoreTypeDef_ClassType.h:188
#define zfclassNotPOD
shows the class is not a POD type, you should not memset it or declare it in stack or copy value by c...
Definition ZFCoreTypeDef_ClassType.h:48
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
_zft_zfflags zfflags
used to hold flags, ensured 32 bit, ensured unsigned
Definition ZFCoreTypeDef_CoreType.h:211
_zft_zfidentity zfidentity
identity type, ensured at least 32 bit, ensured unsigned
Definition ZFCoreTypeDef_CoreType.h:225
#define zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
#define zffalse
bool false type
Definition ZFCoreTypeDef_CoreType.h:111
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
_ZFT_t_zfuint zfuint
same as unsigned int, see zfindex
Definition ZFCoreTypeDef_CoreType.h:169
ZFCompareResult
compare result of two ZFObjects
Definition ZFCoreTypeDef_OtherType.h:28
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
zfflags zfflagsFromString(const ZFClass *enumClass, const zfchar *src, zfindex srcLen=((zfindex) -1), zfchar separatorToken='|')
zfflags conversion using ZFEnum as source, see zfflagsFromStringT
Definition ZFEnum.h:249
zfstring zfflagsToString(const ZFClass *enumClass, zfflags const &value, zfbool includeNotConverted=_ZFT_t_zftrue, zfbool exclusiveMode=_ZFT_t_zffalse, zfflags *notConverted=zft_zfnull, zfchar separatorToken='|')
see zfflagsToStringT
Definition ZFEnum.h:272
zfbool zfflagsToStringT(zfstring &ret, const ZFClass *enumClass, zfflags const &value, zfbool includeNotConverted=_ZFT_t_zftrue, zfbool exclusiveMode=_ZFT_t_zffalse, zfflags *notConverted=zft_zfnull, zfchar separatorToken='|')
zfflags conversion using ZFEnum as source, see zfflagsToString
#define ZFEnumInvalid()
invalid value for ZFEnum
Definition ZFEnum.h:18
zfbool zfflagsFromStringT(zfflags &ret, const ZFClass *enumClass, const zfchar *src, zfindex srcLen=((zfindex) -1), zfchar separatorToken='|')
zfflags conversion using ZFEnum as source, see zfflagsFromString
zfidentity zfidentityCalc(T_Type const &v)
calculate identity from POD object
Definition ZFIdentityUtil.h:92
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define zfcast(T_To, obj)
safely cast ZFObject types, return null if not desired type
Definition ZFObjectCast.h:28
#define zfabstract
typename for class showing that its abstract
Definition ZFObjectClassTypeFwd.h:42
#define ZFOBJECT_DECLARE_ABSTRACT_WITH_CUSTOM_CTOR(ChildClass, SuperClass,...)
see ZFOBJECT_DECLARE_WITH_CUSTOM_CTOR
Definition ZFObjectDeclare.h:160
#define zfsuperI(T_SuperType)
class ref to proper super type, see ZFObject for more info
Definition ZFObjectDeclare.h:26
ZFObject's class info.
Definition ZFClass.h:67
light weight array
Definition ZFCoreArray.h:331
virtual zfbool zfvIsInit(void)
true if the value is in init value state
virtual zfbool zfvToData(ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull)
convert to serializable data
virtual ZFCompareResult objectCompareImpl(ZFObject *anotherObj)
compare result of two enum values as int, or return ZFCompareUncomparable if any of them are ZFEnumIn...
virtual void zfvReset(void)
reset the value to it's init value
virtual void wrappedValueOnAssign(ZFTypeIdWrapper *ref)
see zfvAssign
Definition ZFEnum.h:226
virtual zfbool objectIsInternalPrivate(void)
whether this object is internal private object or its class is ZFClass::classIsInternalPrivate
Definition ZFEnum.h:102
virtual zfindex enumCount(void)=0
get value num
virtual void objectOnInit(zfuint value)
init with value or ZFEnumInvalid if invalid
virtual zfbool wrappedValuePreferStringConverter(void)
whether prefer string converter during serialization, which would result much shorter result
Definition ZFEnum.h:120
virtual void wrappedValue(const void *v)
set the value, no type safe check
virtual zfuint enumValueForName(const zfstring &name)=0
get the value with specified name, or ZFEnumInvalid if not exist
virtual void copyableOnCopyFrom(ZFObject *anotherObj)
called by copy to copy contents from anotherObj
Definition ZFEnum.h:62
virtual const zfstring & enumNameForValue(zfuint value)=0
get the name with specified value, or ZFEnumNameInvalid if not exist
virtual zfbool zfvFromData(const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
convert from serializable data
virtual zfuint enumDefault(void)=0
default value of this enum
virtual const zfstring & enumNameAt(zfindex index)=0
get the name at index, or ZFEnumNameInvalid if not exist
virtual zfbool enumIsFlags(void)=0
true if this enum type is flags type (which support bit operation)
virtual zfbool serializableOnSerializeFromData(const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
for serializable data that has "category" attribute, ZFSerializable would ignore it and leave it to s...
virtual zfbool objectIsInternal(void)
whether this object is internal object or its class is ZFClass::classIsInternal
Definition ZFEnum.h:98
virtual zfindex enumIndexForValue(zfuint value)=0
get the index of enum value, or zfindexMax() if no such enum value
virtual zfbool enumValueContain(zfuint value)=0
return true if contain the specified value
virtual const zfstring & enumName(void)
get current value's name, or ZFEnumNameInvalid if invalid
Definition ZFEnum.h:200
virtual zfbool zfvToString(zfstring &s, zfstring *errorHint=zft_zfnull)
convert to string
virtual zfbool serializableOnSerializeToData(ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializable *refOwner=zft_zfnull)
corresponding to serializableOnSerializeFromData, return whether the task is success,...
virtual zfuint const & enumValue(void)
get the enum value, or ZFEnumInvalid if invalid
Definition ZFEnum.h:191
virtual void enumValue(zfuint const &value)
set the enum value
Definition ZFEnum.h:210
virtual void wrappedValueCopy(void *v)
get the value, no type safe check
virtual void objectOnInit(void)
override this to init your object
Definition ZFEnum.h:78
virtual void * wrappedValue(void)
access the value's address
ZFEnum zfself
class ref to self
Definition ZFEnum.h:39
virtual zfbool zfvFromString(const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
convert from string
virtual zfuint enumValueAt(zfindex index)=0
get the value at index, or ZFEnumInvalid if not exist
virtual void objectInfoImpl(zfstring &ret)
see objectInfo
virtual void objectOnInit(ZFEnum *another)
init with ZFEnum
virtual zfidentity objectHashImpl(void)
see objectHash
Definition ZFEnum.h:85
virtual void objectOnInit(void)
override this to init your object
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
ZFSerializable's data container, see ZFSerializable.
Definition ZFSerializableData.h:74