ZFFramework
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Types | List of all members
ZFInterface Class Referenceabstract

dummy base of interface types More...

#include <ZFObjectInterface.h>

Inheritance diagram for ZFInterface:
ZFCopyable ZFIterable ZFIterableKeyValue ZFOutputFormat ZFProgressable ZFSerializable ZFStyleable ZFUIButtonGroup ZFUIListAdapter ZFUIListCellUpdater ZFUIScrollThumb ZFUIScroller ZFUISysWindowEmbedImpl ZFUIText

Public Member Functions

virtual const ZFClassclassData (void)=0
 get instance's class info
 
virtual ZFObjecttoObject (void)=0
 convert to ZFObject type
 

Static Public Member Functions

static const ZFClassClassData (void)
 get class info
 

Protected Types

typedef _ZFP_ObjI_Base zfsuper
 typedef for super (always ZFInterface for an interface type)
 
typedef ZFInterface zfself
 typedef for self
 

Detailed Description

dummy base of interface types

usage:

// declare an interface
zfinterface YourInterface : zfextend ZFInterface {
};
// implement an interface
, zfimplement YourInterface
, zfimplement ParentInterface1
, zfimplement ParentInterface2
...
{
ZFIMPLEMENT_DECLARE(YourInterface, ParentInterface1, ParentInterface2, ...)
};
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFIMPLEMENT_DECLARE(ImplementedInterfaces,...)
see ZFINTERFACE_DECLARE
Definition ZFObjectInterface.h:169
#define zfimplement
shows class implement from interface, see ZFInterface
Definition ZFObjectInterface.h:24
#define zfinterface
shows the type is an interface, see ZFInterface
Definition ZFObjectInterface.h:20
#define ZFINTERFACE_DECLARE(InterfaceName, ParentInterface,...)
see ZFInterface
Definition ZFObjectInterface.h:100
dummy base of interface types
Definition ZFObjectInterface.h:254
base class of all objects
Definition ZFObjectCore.h:209

(ZFTAG_LIMITATION) due to some limitations of C++ (basically the limitations of diamond inheritance), you should remember these while using interface:


ADVANCED:
to simulate a interface that inherit from other interfaces, you should do it like this:
Java code:

public interface IParent0 {}
public interface IParent1 {}
public interface IChild extends IParent0 extends IParent1 {}
public class ObjParent implements IParent0 {}
public class ObjChild extends ObjParent implements IChild {}

equivalent code for ZFInterface:

};
};
zfinterface IChild : zfextend ZFInterface { // note: here is always ZFInterface
};
zfclass ObjParent : zfextend ZFObject, zfimplement IParent0 {
};
zfclass ObjChild : zfextend ObjParent, zfimplement IChild
, zfimplement IParent1 // note: here is required
{
ZFOBJECT_DECLARE(ObjChild, ObjParent)
ZFIMPLEMENT_DECLARE(IChild, IParent1) // note: here is required
};

Member Function Documentation

◆ classData()

virtual const ZFClass * ZFInterface::classData ( void )
pure virtual

get instance's class info

Implemented in ZFBase64, ZFCompressLevel, v_ZFCurve, ZFJsonType, v_ZFJsonOutputToken, v_ZFJson, ZFRegExpOption, v_ZFRegExpOptionFlags, v_ZFRegExpResult, ZFRegExp, v_ZFTextTemplateRunParam, ZFTextTemplateIndexFlag, v_ZFTextTemplateIndexData, v_ZFTextTemplateParam, ZFXmlType, v_ZFXml, v_ZFXmlOutputToken, ZFArray, ZFContainer, v_ZFDynamic, ZFFileOpenOption, v_ZFFileOpenOptionFlags, v_ZFFileFindData, ZFHashMap, ZFHashSet, ZFKeyValueContainer, ZFLogFormat, ZFLogLevel, ZFMap, v_ZFCallback, v_ZFListener, v_ZFIOCallback, v_ZFOutput, v_ZFInput, v_ZFClassInstanceObserverAddParam, v_ZFClass, ZFEnum, v_ZFMethod, v_ZFProperty, ZFStyleableObject, 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, ZFSet, ZFStringEncoding, ZFStyleList, v_ZFTimeValue, v_ZFTimeInfo, ZFTime, ZFHttpMethod, ZFHttpRequest, ZFTcpType, v_ZFUdpAddr, ZFUIImageImplNinePatchPos, ZFAnimationNativeViewCurve, ZFAnimationNativeView, ZFEnvDeviceUIType, ZFTimeLineCurveEaseIn, ZFTimeLineCurveEaseOut, ZFTimeLineCurveEaseInOut, ZFTimeLineCurveBounceIn, ZFTimeLineCurveBounceOut, ZFTimeLineCurveBounceInOut, ZFUIDrawableView, ZFUIGlobalStyle, ZFUIImage, ZFUIImageView, ZFUIKeyAction, ZFUIKeyCode, ZFUIMouseAction, ZFUIMouseButton, ZFUINativeViewWrapper, ZFUIRootView, ZFUIScrollerDefault, 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, ZFAnimationGroupChildData, ZFAnimationGroup, ZFAnimationTimeLine, ZFTimeLineCurve, and ZFTimeLineCurveLinear.


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