logical cMainFunctionEdit :: ExecuteFunction (char *fname, logical chk_opt ) { char actname[ID_SIZE]; cfte *cfteptr; logical term = NO; BEGINSEQ static cfte acttbl[] = { cfte("Compile",ALINK(this,cMainFunctionEdit,Compile)), cfte("ErrorLookup",ALINK(this,cMainFunctionEdit,ErrorLookup)), cfte("Link",ALINK(this,cMainFunctionEdit,Link)), }; static srt cftesrt(sizeof(acttbl)/CFTE,CFTE,UNDEF,UNDEF,UNDEF,(char *)acttbl,NO); if ( !cftesrt.srtkln() ) cftesrt.srtsor(CFTE_KPS,CFTE_KLN,CFTE_KTP); if ( cfteptr = (cfte *)cftesrt.srtigt(cftesrt.srtssr(gvtxstb(actname,fname,ID_SIZE))) ) { if ( chk_opt ) LEAVESEQ term = cfteptr->ActionCall(this); } else term = CTX_Control::ExecuteFunction(fname,chk_opt); if ( term && !chk_opt ) DisplayMessage(); ENDSEQ return(term); }
logical cClassCode :: ExecuteFunction (char *fname, logical chk_opt ) { char actname[ID_SIZE]; cfte *cfteptr; logical term = NO; BEGINSEQ static cfte acttbl[] = { cfte("InsertCheckError",ALINK(this,cClassCode,InsertCheckError)), cfte("InsertError",ALINK(this,cClassCode,InsertError)), cfte("InsertErrorNum",ALINK(this,cClassCode,InsertErrorNum)), cfte("InsertLeaveseq",ALINK(this,cClassCode,InsertLeaveseq)), cfte("InsertProjError",ALINK(this,cClassCode,InsertProjError)), }; static srt cftesrt(sizeof(acttbl)/CFTE,CFTE,UNDEF,UNDEF,UNDEF,(char *)acttbl,NO); if ( !cftesrt.srtkln() ) cftesrt.srtsor(CFTE_KPS,CFTE_KLN,CFTE_KTP); if ( cfteptr = (cfte *)cftesrt.srtigt(cftesrt.srtssr(gvtxstb(actname,fname,ID_SIZE))) ) { if ( chk_opt ) LEAVESEQ term = cfteptr->ActionCall(this); } else term = cClassCodeBase::ExecuteFunction(fname,chk_opt); if ( term && !chk_opt ) DisplayMessage(); ENDSEQ return(term); }
logical pKFZVS :: ExecuteFunction (char *fname, logical chk_opt ) { char actname[ID_SIZE]; cfte *cfteptr; logical term = NO; BEGINSEQ static cfte acttbl[] = { cfte("GetSparte",ALINK(this,pKFZVS,GetSparte)), }; static srt cftesrt(sizeof(acttbl)/CFTE,CFTE,UNDEF,UNDEF,UNDEF,(char *)acttbl,NO); if ( !cftesrt.srtkln() ) cftesrt.srtsor(CFTE_KPS,CFTE_KLN,CFTE_KTP); if ( cfteptr = (cfte *)cftesrt.srtigt(cftesrt.srtssr(gvtxstb(actname,fname,ID_SIZE))) ) { if ( chk_opt ) LEAVESEQ cfteptr->LINKINST(this); term = cfteptr->ActionCall(); } else term = pVS_base::ExecuteFunction(fname,chk_opt); if ( term && !chk_opt ) DisplayMessage(); ENDSEQ return(term); }
logical cClassCodeBase :: ExecuteFunction (char *fname, logical chk_opt ) { char actname[ID_SIZE]; cfte *cfteptr; logical term = NO; BEGINSEQ static cfte acttbl[] = { cfte("DeleteLine",ALINK(this,cClassCodeBase,DeleteLine)), cfte("FindBalancedPar",ALINK(this,cClassCodeBase,FindBalancedPar)), cfte("GetClassName",ALINK(this,cClassCodeBase,GetClassName)), cfte("GetCurrentOffset",ALINK(this,cClassCodeBase,GetCurrentOffset)), cfte("InsertBlock",ALINK(this,cClassCodeBase,InsertBlock)), cfte("InsertExpression",ALINK(this,cClassCodeBase,InsertExpression)), cfte("InsertSwitch",ALINK(this,cClassCodeBase,InsertSwitch)), }; static srt cftesrt(sizeof(acttbl)/CFTE,CFTE,UNDEF,UNDEF,UNDEF,(char *)acttbl,NO); if ( !cftesrt.srtkln() ) cftesrt.srtsor(CFTE_KPS,CFTE_KLN,CFTE_KTP); if ( cfteptr = (cfte *)cftesrt.srtigt(cftesrt.srtssr(gvtxstb(actname,fname,ID_SIZE))) ) { if ( chk_opt ) LEAVESEQ term = cfteptr->ActionCall(this); } else term = cNotifyHighContext::ExecuteFunction(fname,chk_opt); if ( term && !chk_opt ) DisplayMessage(); ENDSEQ return(term); }
logical sODC_Project :: ExecuteFunction (char *fname, logical chk_opt ) { char actname[ID_SIZE]; cfte *cfteptr; logical term = NO; BEGINSEQ static cfte acttbl[] = { cfte("GenerateCompile",ALINK(this,sODC_Project,GenerateCompile)), cfte("GetCompileCommand",ALINK(this,sODC_Project,GetCompileCommand)), cfte("GetLinkCommand",ALINK(this,sODC_Project,GetLinkCommand)), cfte("GetProjectPath",ALINK(this,sODC_Project,GetProjectPath)), cfte("InitializeExternalResources",ALINK(this,sODC_Project,InitializeExternalResources)), cfte("SetupReferences",ALINK(this,sODC_Project,SetupReferences)), }; static srt cftesrt(sizeof(acttbl)/CFTE,CFTE,UNDEF,UNDEF,UNDEF,(char *)acttbl,NO); if ( !cftesrt.srtkln() ) cftesrt.srtsor(CFTE_KPS,CFTE_KLN,CFTE_KTP); if ( cfteptr = (cfte *)cftesrt.srtigt(cftesrt.srtssr(gvtxstb(actname,fname,ID_SIZE))) ) { if ( chk_opt ) LEAVESEQ term = cfteptr->ActionCall(this); } else term = CTX_Structure::ExecuteFunction(fname,chk_opt); if ( term && !chk_opt ) DisplayMessage(); ENDSEQ return(term); }
/** Prepare finalize. * The threads are prepared for finalization. If any of the threads return * false the whole list will return false. * This operation is carried out unlocked. Lock it from the outside if needed. * This is done because it is likely that this will be chained with other * actions that require locking, thus you can lock the whole operation. * @param finalizer thread finalizer to use to prepare finalization of the threads * @return true, if prepare_finalize() returned true for all threads in the * list, false if at least one thread returned false. */ bool ThreadList::prepare_finalize(ThreadFinalizer *finalizer) { MutexLocker lock(__finalize_mutex); bool can_finalize = true; CannotFinalizeThreadException cfte("Cannot finalize one or more threads"); bool threw_exception = false; for (reverse_iterator i = rbegin(); i != rend(); ++i) { // Note that this loop may NOT be interrupted in the middle by break, // since even if the thread denies finalization it can still be finalized // and we have to ensure that every thread got a call to prepare_finalize()! try { if ( ! finalizer->prepare_finalize(*i) ) { can_finalize = false; } if ( ! (*i)->prepare_finalize() ) { can_finalize = false; } } catch (CannotFinalizeThreadException &e) { cfte.append("Thread '%s' threw an exception while preparing finalization of " "ThreadList '%s' (IGNORED)", (*i)->name(), __name); cfte.append(e); threw_exception = true; } catch (Exception &e) { cfte.append("Thread '%s' threw a generic exception while preparing finalization of " "ThreadList '%s' (IGNORED)", (*i)->name(), __name); cfte.append(e); threw_exception = true; } } if ( threw_exception ) { throw cfte; } return can_finalize; }
logical DLInterpreter :: ExecuteFunction (char *fname, logical chk_opt ) { char actname[ID_SIZE]; cfte *cfteptr; logical term = NO; BEGINSEQ static cfte acttbl[] = { cfte("STEPOUT",ALINK(this,DLInterpreter,STEPOUT)), cfte("STEP",ALINK(this,DLInterpreter,STEP)), cfte("SETBREAK",ALINK(this,DLInterpreter,SETBREAK)), cfte("SAV",ALINK(this,DLInterpreter,SAV)), cfte("S",ALINK(this,DLInterpreter,S)), cfte("RUN",ALINK(this,DLInterpreter,RUN)), cfte("RESETBREAK",ALINK(this,DLInterpreter,RESETBREAK)), cfte("QUIT",ALINK(this,DLInterpreter,QUIT)), cfte("Q",ALINK(this,DLInterpreter,Q)), cfte("O",ALINK(this,DLInterpreter,O)), cfte("NEXT",ALINK(this,DLInterpreter,NEXT)), cfte("N",ALINK(this,DLInterpreter,N)), cfte("LISTEXPRESSION",ALINK(this,DLInterpreter,LISTEXPRESSION)), cfte("LISTCURRENTLINE",ALINK(this,DLInterpreter,LISTCURRENTLINE)), cfte("LAV",ALINK(this,DLInterpreter,LAV)), cfte("L",ALINK(this,DLInterpreter,L)), cfte("JUMPOVER",ALINK(this,DLInterpreter,JUMPOVER)), cfte("EXIT",ALINK(this,DLInterpreter,EXIT)), cfte("DSB",ALINK(this,DLInterpreter,DSB)), cfte("DRB",ALINK(this,DLInterpreter,DRB)), cfte("DLC",ALINK(this,DLInterpreter,DLC)), cfte("DJO",ALINK(this,DLInterpreter,DJO)), cfte("DBA",ALINK(this,DLInterpreter,DBA)), cfte("CONTINUE",ALINK(this,DLInterpreter,CONTINUE)), cfte("CD",ALINK(this,DLInterpreter,CD)), cfte("C",ALINK(this,DLInterpreter,C)), cfte("BT",ALINK(this,DLInterpreter,BT)), cfte("BREAKALWAYS",ALINK(this,DLInterpreter,BREAKALWAYS)), cfte("BACKTRACE",ALINK(this,DLInterpreter,BACKTRACE)), }; static srt cftesrt(sizeof(acttbl)/CFTE,CFTE,UNDEF,UNDEF,UNDEF,(char *)acttbl,NO); if ( !cftesrt.srtkln() ) cftesrt.srtsor(CFTE_KPS,CFTE_KLN,CFTE_KTP); if ( cfteptr = (cfte *)cftesrt.srtigt(cftesrt.srtssr(gvtxstb(actname,fname,ID_SIZE))) ) { if ( chk_opt ) LEAVESEQ cfteptr->LINKINST(this); term = cfteptr->ActionCall(); } else term = CLInterpreter::ExecuteFunction(fname,chk_opt); ENDSEQ return(term); }