virtual const zfchar *moduleFilePath(void) { if(this->_moduleFilePath.isEmpty()) { zfstring tmp; #if ZF_ENV_sys_Windows zfcharW buf[1024] = {0}; ::GetModuleFileNameW(zfnull, buf, 1024); ZFString::toZFChar(tmp, buf, ZFStringEncodingForZFCharW); #elif ZF_ENV_sys_Posix || ZF_ENV_sys_unknown // #if ZF_ENV_sys_Windows zfcharA buf[1024] = {0}; zfint len = (zfint)::readlink(zfTextA("/proc/self/exe"), buf, 1024); if(len > 0) { buf[len] = '\0'; } else { zfscpyA(buf, zfstringWithFormat(zfTextA("./unknown")).cString()); } ZFString::toZFChar(tmp, buf, ZFStringEncoding::e_UTF8); #endif // #elif ZF_ENV_sys_Posix || ZF_ENV_sys_unknown zfbool result = ZFFile::filePathFormat(this->_moduleFilePath, tmp.cString()); zfCoreAssert(result); } return this->_moduleFilePath; }
ZF_NAMESPACE_GLOBAL_BEGIN void ZFPropertyCallbackIsValueAccessedChange(ZF_IN const ZFProperty *property, ZFPropertyCallbackIsValueAccessed callback) { zfCoreAssert(property != zfnull && callback != zfnull); const_cast<ZFProperty *>(property)->callbackIsValueAccessed = callback; }
virtual const zfchar *moduleFilePath(void) { if(this->_moduleFilePath.isEmpty()) { this->_moduleFilePath = QCoreApplication::applicationFilePath().toStdString().c_str(); zfCoreAssert(!this->_moduleFilePath.isEmpty()); } return this->_moduleFilePath; }
virtual const zfchar *modulePath(void) { if(this->_modulePath.isEmpty()) { (void)this->moduleFilePath(); zfindex pos = zfstringFindReversely(this->_moduleFilePath, ZFFile::fileSeparator); zfCoreAssert(pos != zfindexMax); this->_modulePath.assign(this->_moduleFilePath, 0, pos); } return this->_modulePath; }
const zfchar *ZFUIPointFromString(ZF_OUT ZFUIPoint &ret, ZF_IN const zfchar *src, ZF_IN_OPT zfindex srcLen /* = zfindexMax */) { zfCoreAssert(src != zfnull); ZFCoreArrayPOD<zfint> buf; const zfchar *errPos = zfCoreDataPairSplitInt(buf, 2, src, srcLen); if(errPos != zfnull) { return errPos; } ret.x = buf[0]; ret.y = buf[1]; return errPos; }
void ZFPropertyCallbackGetInfoChange(ZF_IN const ZFProperty *property, ZFPropertyCallbackGetInfo callback) { zfCoreAssert(property != zfnull && callback != zfnull); const_cast<ZFProperty *>(property)->callbackGetInfo = callback; }
void ZFPropertyCallbackAssignGetChange(ZF_IN const ZFProperty *property, ZFPropertyCallbackAssignGet callback) { zfCoreAssert(property != zfnull && callback != zfnull); const_cast<ZFProperty *>(property)->callbackAssignGet = callback; }
void ZFPropertyCallbackCompareChange(ZF_IN const ZFProperty *property, ZFPropertyCallbackCompare callback) { zfCoreAssert(property != zfnull && callback != zfnull); const_cast<ZFProperty *>(property)->callbackCompare = callback; }
void ZFPropertyCallbackResetInitValueChange(ZF_IN const ZFProperty *property, ZFPropertyCallbackResetInitValue callback) { zfCoreAssert(property != zfnull && callback != zfnull); const_cast<ZFProperty *>(property)->callbackResetInitValue = callback; }