5#ifndef _ZFI_ZFCallerInfo_h_
6#define _ZFI_ZFCallerInfo_h_
26#define ZF_CALLER_FILE_TO_NAME(path) (_ZFP_ZF_CALLER_FILE_TO_NAME(path).cString())
30#define ZF_CALLER_FILE_TO_NAME_REF(ret, path) _ZFP_ZF_CALLER_FILE_TO_NAME(ret, path)
39#define ZF_CALLER_FILE_NAME ZF_CALLER_FILE_TO_NAME(__FILE__)
46#define ZF_CALLER_FILE __FILE__
52#define ZF_CALLER_FUNCTION __FUNCTION__
56#define ZF_CALLER_LINE __LINE__
83 inline operator zfbool (
void)
const {
return this->valid();}
129 const zfchar *_callerFile;
130 const zfchar *_callerFunc;
138 this->_callerFile = callerFile;
139 this->_callerFunc = callerFunc;
140 this->_callerLine = callerLine;
149#define ZFCallerInfoCreate() \
150 ZFCallerInfo()._ZFP_callerInfo(ZF_CALLER_FILE, ZF_CALLER_FUNCTION, ZF_CALLER_LINE)
156#define ZFCallerInfoEmpty() _ZFP_ZFCallerInfoEmpty()
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define zffinal
dummy macro shows that a method or class is designed must not to be overrided
Definition ZFCoreTypeDef_ClassType.h:63
#define zfclassLikePOD
shows the class is not a POD type, but you may use it like a POD except memset it to 0
Definition ZFCoreTypeDef_ClassType.h:41
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#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
#define ZFOUTPUT_TYPE(T_Type, outputAction)
declare your custom type conversion to string, convenient for debug
Definition ZFCoreTypeDef_OtherType.h:221
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
util class to hold caller info
Definition ZFCallerInfo.h:63
ZFCallerInfo(void)
main constructor
void objectInfoT(zfstring &ret) const
see objectInfo
Definition ZFCallerInfo.h:116
zfbool callerInfoT(zfstring &ret) const
return caller info looks like "[File function (line)]"
zfuint callerLine(void) const
see ZF_CALLER_LINE
Definition ZFCallerInfo.h:92
ZFCallerInfo(const zfchar *callerFile, const zfchar *callerFunc, zfuint callerLine)
main constructor
void callerInfo(const zfchar *callerFile, const zfchar *callerFunc, zfuint callerLine)
set the caller info
zfbool valid(void) const
whether valid
Definition ZFCallerInfo.h:95
const zfchar * callerFunc(void) const
see ZF_CALLER_FUNCTION
Definition ZFCallerInfo.h:90
zfstring callerInfo(void) const
return caller info looks like "[File function (line)]"
Definition ZFCallerInfo.h:109
const zfchar * callerFile(void) const
see ZF_CALLER_FILE
Definition ZFCallerInfo.h:88
zfstring objectInfo(void) const
return object info
Definition ZFCallerInfo.h:120