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

serialization for ZFMethod More...

#include "ZFSerializable.h"
#include "ZFTypeId.h"

Go to the source code of this file.

Classes

class  v_ZFMethod
 type wrapper for ZFTypeId::Value More...
 

Functions

const zfstringZFTypeId_ZFMethod (void)
 see ZFTYPEID_DECLARE
 
zfbool ZFMethodFromDataT (_ZFP_PropTypeW_ZFMethod &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
 see ZFTYPEID_DECLARE
 
_ZFP_PropTypeW_ZFMethod ZFMethodFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
 see ZFTYPEID_DECLARE
 
zfbool ZFMethodToDataT (ZFSerializableData &serializableData, _ZFP_PropTypeW_ZFMethod const &v, zfstring *outErrorHint=zft_zfnull)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFMethodToData (_ZFP_PropTypeW_ZFMethod const &v, zfstring *outErrorHint=zft_zfnull)
 see ZFTYPEID_DECLARE
 
zfbool ZFMethodFromStringT (_ZFP_PropTypeW_ZFMethod &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
 util method to convert ZFMethod from string
 
_ZFP_PropTypeW_ZFMethod ZFMethodFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
 util method to convert ZFMethod from string
 
zfbool ZFMethodToStringT (zfstring &s, _ZFP_PropTypeW_ZFMethod const &v, zfstring *errorHint=zft_zfnull)
 util method to convert ZFMethod to string
 
zfstring ZFMethodToString (_ZFP_PropTypeW_ZFMethod const &v, zfstring *errorHint=zft_zfnull)
 util method to convert ZFMethod to string
 
const ZFMethodZFMethodFromSig (const zfstring &classOrNamespace, const zfstring &methodName, const zfchar *paramTypeId0=zft_zfnull, const zfchar *paramTypeId1=zft_zfnull, const zfchar *paramTypeId2=zft_zfnull, const zfchar *paramTypeId3=zft_zfnull, const zfchar *paramTypeId4=zft_zfnull, const zfchar *paramTypeId5=zft_zfnull, const zfchar *paramTypeId6=zft_zfnull, const zfchar *paramTypeId7=zft_zfnull)
 parse method from method sig
 
const ZFMethodZFMethodFromSig (const zfstring &methodSig, const ZFCoreArray< ZFIndexRange > &methodSigPos)
 parse method from method sig
 
zfbool ZFMethodSigSplit (ZFCoreArray< ZFIndexRange > &ret, const zfstring &src, zfindex srcLen=((zfindex) -1))
 split method sig
 

Detailed Description

serialization for ZFMethod

Function Documentation

◆ ZFTypeId_ZFMethod()

const zfstring & ZFTypeId_ZFMethod ( void )
inline

see ZFTYPEID_DECLARE

serializable data:

<ZFMethod value="methodSig" />
reflectable method for ZFObject
Definition ZFMethod.h:252

valid method signature:

  • "OwnerClass.methodName" : for class member type method
  • "OwnerClass.methodName:paramTypeId0:paramTypeId1" : for method with params
  • "methodName" : for function type method with default name space
  • ".methodName" : for function type method with default name space
  • "MethodNamespace0.MethodNamespace1.methodName" : for function type method with custom name space

◆ ZFMethodFromSig()

const ZFMethod * ZFMethodFromSig ( const zfstring & methodSig,
const ZFCoreArray< ZFIndexRange > & methodSigPos )
extern

parse method from method sig

methodSigPos must be successfully decoded by ZFMethodSigSplit

◆ ZFMethodSigSplit()

zfbool ZFMethodSigSplit ( ZFCoreArray< ZFIndexRange > & ret,
const zfstring & src,
zfindex srcLen = ((zfindex) -1) )
extern

split method sig

result ensured to contain (ZFMETHOD_MAX_PARAM + 2) element if success:

  • pos[0] : range of OwnerClass or MethodNamespace, 0 length for global namespace
  • pos[1] : range of methodName, ensured not empty
  • pos[2] : range of paramTypeId0, 0 length if none
  • pos[3] : range of paramTypeId1, 0 length if none
  • pos[4] : range of paramTypeId2, 0 length if none
  • pos[5] : range of paramTypeId3, 0 length if none
  • pos[6] : range of paramTypeId4, 0 length if none
  • pos[7] : range of paramTypeId5, 0 length if none
  • pos[8] : range of paramTypeId6, 0 length if none
  • pos[9] : range of paramTypeId7, 0 length if none