bool KoStore::finalize() { Q_D(KoStore); Q_ASSERT(!d->finalized); // call this only once! d->finalized = true; return doFinalize(); }
//----------------------------------------------------------------------------- // 描述: 应用程序结束化 //----------------------------------------------------------------------------- void IseApplication::finalize() { if (initialized_) { openTerminal(); doFinalize(); initialized_ = false; } }
void Abstract::doGuardFinalize() { if (pArea && pArea->background == gfx->glfond) pArea->background = 0; doFinalize(); reset_keyboard(); clear_keybuf(); reset_mouse(); }
//------------------------------------------------------------------------------ void CSeqMaskerOstat::finalize() { if( state != udata && state != thres ) { CNcbiOstrstream ostr; ostr << "can not finalize data structure in state " << state; string s = CNcbiOstrstreamToString(ostr); NCBI_THROW( CSeqMaskerOstatException, eBadState, s ); } state = final; doFinalize(); }
//----------------------------------------------------------------------------- // 描述: 应用程序初始化 (若初始化失败则抛出异常) //----------------------------------------------------------------------------- void IseApplication::initialize() { try { #ifdef ISE_LINUX // 在初始化阶段要屏蔽退出信号 SignalMasker sigMasker(true); sigMasker.setSignals(1, SIGTERM); sigMasker.block(); #endif networkInitialize(); initExeName(); iseBusiness_->beforeInit(); iseBusiness_->initIseOptions(iseOptions_); processStandardArgs(true); checkMultiInstance(); // if (iseOptions_.getIsDaemon()) initDaemon(); initSignals(); initNewOperHandler(); applyIseOptions(); createMainServer(); iseBusiness_->initialize(); mainServer_->initialize(); iseBusiness_->afterInit(); if (iseOptions_.getIsDaemon()) closeTerminal(); initialized_ = true; } catch (Exception& e) { openTerminal(); iseBusiness_->onInitFailed(e); doFinalize(); throw; } }