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

abstract IO More...

#include "ZFObject.h"

Go to the source code of this file.

Classes

class  v_ZFIOOpenOption
 file open option More...
class  ZFIOOpenOptionFlags
 see v_ZFIOOpenOption, ZFIOOpenOptionFlagsToString, ZFIOOpenOptionFlagsFromString More...
class  ZFIOFindData
 data used by ZFIO when finding files More...
class  ZFIOFindData::Impl
 for impl to achieve custom find logic More...
class  v_ZFIOFindData
 type wrapper for ZFTypeId::Value More...
class  ZFIOToken
 see ZFIOImplForPathType More...
class  ZFIOImpl
 see ZFIOImplForPathType More...

Macros

#define ZFSerializableKeyword_ZFIO_pathInfo
 keyword for serialize
#define ZFSerializableKeyword_ZFIO_flags
 keyword for serialize
#define ZFSerializableKeyword_ZFIO_localPath
 keyword for serialize
#define ZFIO_DECLARE(ZFLIB_, pathType)
 see ZFIOImplForPathType
#define ZFIO_DEFINE(pathType, ZFIOImpl_)
 see ZFIOImplForPathType

Typedefs

typedef v_ZFIOOpenOption::ZFEnumType ZFIOOpenOption
 see v_ZFIOOpenOption
typedef v_ZFIOOpenOption v_ZFIOOpenOptionFlags
 type wrapper for ZFTypeId::Value

Functions

zfbool ZFIOOpenOptionFromStringT (zfauto &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
 see v_ZFIOOpenOption, return enum object if success
zfbool ZFIOOpenOptionToStringT (zfstring &ret, v_ZFIOOpenOption *const &value, zfstring *errorHint=zft_zfnull)
 see ZFIOOpenOption, return empty string if error
zfstring ZFIOOpenOptionToString (v_ZFIOOpenOption *const &value, zfstring *errorHint=zft_zfnull)
 see v_ZFIOOpenOption, return empty string if error
const zfstringZFTypeId_ZFIOOpenOption (void)
zfbool ZFIOOpenOptionFromDataT (_ZFP_PropTypeW_ZFIOOpenOption &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
 see ZFTYPEID_DECLARE
_ZFP_PropTypeW_ZFIOOpenOption ZFIOOpenOptionFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
 see ZFTYPEID_DECLARE
zfbool ZFIOOpenOptionToDataT (ZFSerializableData &serializableData, _ZFP_PropTypeW_ZFIOOpenOption const &v, zfstring *outErrorHint=zft_zfnull)
 see ZFTYPEID_DECLARE
ZFSerializableData ZFIOOpenOptionToData (_ZFP_PropTypeW_ZFIOOpenOption const &v, zfstring *outErrorHint=zft_zfnull)
 see ZFTYPEID_DECLARE
zfbool ZFIOOpenOptionFromStringT (_ZFP_PropTypeW_ZFIOOpenOption &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOption from string
_ZFP_PropTypeW_ZFIOOpenOption ZFIOOpenOptionFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOption from string
zfbool ZFIOOpenOptionToStringT (zfstring &s, _ZFP_PropTypeW_ZFIOOpenOption const &v, zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOption to string
zfstring ZFIOOpenOptionToString (_ZFP_PropTypeW_ZFIOOpenOption const &v, zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOption to string
const zfstringZFTypeId_ZFIOOpenOptionFlags (void)
zfbool ZFIOOpenOptionFlagsFromDataT (_ZFP_PropTypeW_ZFIOOpenOptionFlags &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
 see ZFTYPEID_DECLARE
_ZFP_PropTypeW_ZFIOOpenOptionFlags ZFIOOpenOptionFlagsFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull)
 see ZFTYPEID_DECLARE
zfbool ZFIOOpenOptionFlagsToDataT (ZFSerializableData &serializableData, _ZFP_PropTypeW_ZFIOOpenOptionFlags const &v, zfstring *outErrorHint=zft_zfnull)
 see ZFTYPEID_DECLARE
ZFSerializableData ZFIOOpenOptionFlagsToData (_ZFP_PropTypeW_ZFIOOpenOptionFlags const &v, zfstring *outErrorHint=zft_zfnull)
 see ZFTYPEID_DECLARE
zfbool ZFIOOpenOptionFlagsFromStringT (_ZFP_PropTypeW_ZFIOOpenOptionFlags &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOptionFlags from string
_ZFP_PropTypeW_ZFIOOpenOptionFlags ZFIOOpenOptionFlagsFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOptionFlags from string
zfbool ZFIOOpenOptionFlagsToStringT (zfstring &s, _ZFP_PropTypeW_ZFIOOpenOptionFlags const &v, zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOptionFlags to string
zfstring ZFIOOpenOptionFlagsToString (_ZFP_PropTypeW_ZFIOOpenOptionFlags const &v, zfstring *errorHint=zft_zfnull)
 util method to convert ZFIOOpenOptionFlags to string
const zfstringZFTypeId_ZFIOFindData (void)
zfautoT< ZFIOImplZFIOImplForPathType (const zfstring &pathType)
 main entry for abstract IO for ZFFramework
ZFCoreArray< zfautoT< ZFIOImpl > > ZFIOImplList ()
 return a list of ZFIOImplRegister, for debug use only
void ZFIOImplRegister (const zfstring &pathType, ZFIOImpl *ioImpl)
 see ZFIOImplForPathType
void ZFIOImplUnregister (const zfstring &pathType)
 see ZFIOImplForPathType

Detailed Description

abstract IO

Function Documentation

◆ ZFTypeId_ZFIOOpenOption()

const zfstring & ZFTypeId_ZFIOOpenOption ( void )
inline


◆ ZFTypeId_ZFIOOpenOptionFlags()

const zfstring & ZFTypeId_ZFIOOpenOptionFlags ( void )
inline


◆ ZFTypeId_ZFIOFindData()

const zfstring & ZFTypeId_ZFIOFindData ( void )
inline


◆ ZFIOImplForPathType()

zfautoT< ZFIOImpl > ZFIOImplForPathType ( const zfstring & pathType)
extern

main entry for abstract IO for ZFFramework

typical usage:

  1. use ZFIOImplForPathType to access io impl
  2. use ZFIOImpl::ioOpen to open specified pathData
  3. use ZFIOToken::ioRead or ZFIOToken::ioWrite to process contents

ZFIOImpl is a low level abstract IO to process various IO, which including: file, resource, network
for convenient, it's recommend to use ZFInput and ZFOutput for high level IO processing