ZFFramework
 
Loading...
Searching...
No Matches
ZFTypeIdCore.h File Reference

reflectable type define More...

Go to the source code of this file.

Classes

class  ZFTypeIdWrapper
 dummy base for all wrapper types, see ZFTypeId::Value More...
 

Macros

#define ZFTYPEID_PROGRESS_DEFINE(TypeName, Type, progressUpdateAction)
 register Type's progress update logic
 
#define ZFTYPEID_PROGRESS_DEFINE_BY_VALUE(TypeName, Type)
 util macro to declare ZFTYPEID_PROGRESS_DEFINE by raw value calculating
 

Detailed Description

reflectable type define

Macro Definition Documentation

◆ ZFTYPEID_PROGRESS_DEFINE

#define ZFTYPEID_PROGRESS_DEFINE ( TypeName,
Type,
progressUpdateAction )

register Type's progress update logic

a progress update means, the type can be changed by timer by supply a "from/to" value range
for example, an float type with range "[0.5, 3.0]" and progress "0.3", would result "0.5 + (3.0 - 0.5) * 0.3", which is 1.25
this is useful to make a property change with animation

to use this, register your type by this macro, with this proto type:

zfbool update(
ZF_OUT Type &ret
, ZF_IN Type const &from
, ZF_IN Type const &to
, ZF_IN zffloat progress
);
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_OUT
dummy macro that shows the param used as required output
Definition ZFCoreTypeDef_ClassType.h:188
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_zft_zffloat zffloat
same as float, see zfindex
Definition ZFCoreTypeDef_CoreType.h:183

then use them by ZFProgressable::progressUpdate

to register:

ZFTYPEID_PROGRESS_DEFINE(YourType, YourType, {
yourProgress(ret, from, to, progress);
})
#define ZFTYPEID_PROGRESS_DEFINE(TypeName, Type, progressUpdateAction)
register Type's progress update logic
Definition ZFTypeIdCore.h:237

or use ZFTYPEID_PROGRESS_DEFINE_BY_VALUE for short