INT16 CDlpFile_ResetAllOptions(CDlpObject* __this, BOOL bInit) { GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); DEBUGMSG(-1,"CDlpFile_ResetAllOptions;",0,0,0); { /*{{CGEN_RESETALLOPTIONS*/ _this->m_bAppend = FALSE; _this->m_bBig = FALSE; _this->m_bCompress = FALSE; _this->m_bDir = FALSE; _this->m_bExecute = FALSE; _this->m_bLittle = FALSE; _this->m_bPstComma = FALSE; _this->m_bPstContour = FALSE; _this->m_bPstHalfspectrum = FALSE; _this->m_bPstLegend = FALSE; _this->m_bPstTriglabels = FALSE; _this->m_bPstXYPlot = FALSE; _this->m_bReverse = FALSE; _this->m_bStrings = FALSE; _this->m_bTranspose = FALSE; _this->m_bZip = FALSE; /*}}CGEN_RESETALLOPTIONS*/ } return INVOKE_BASEINST_1(ResetAllOptions,bInit); }
INT16 CFsttools_OnRcByUsedPath(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; data* idTransRC; FLOAT64 nPathWeight; INT64 nUnit; BOOL bReset; data* idUnitTransCount; fst* itFst; GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); itFst = MIC_GET_I_EX(itFst,fst,1,1); idUnitTransCount = MIC_GET_I_EX(idUnitTransCount,data,2,2); bReset = MIC_GET_B(3,0); nUnit = (INT64)MIC_GET_N(4,0); nPathWeight = MIC_GET_N(5,1); idTransRC = MIC_GET_I_EX(idTransRC,data,6,3); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; __nErr = CFsttools_RcByUsedPath(_this, idTransRC, nPathWeight, nUnit, bReset, idUnitTransCount, itFst); return __nErr; }
BOOL CFsttools_IsKindOf(CDlpObject* __this, const char* lpClassName) { GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); if (dlp_strncmp(lpClassName,"fsttools",L_NAMES) == 0) return TRUE; else return INVOKE_BASEINST_1(IsKindOf,lpClassName); }
/*{{CGEN_COCCF */ INT16 CHelloworld_OnGermanSet(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CHelloworld,NOT_EXEC); { printf( "\nMake it German, baby!"); } return O_K; }
INT16 CFstsearch_OnWnormOffChanged(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CFstsearch,NOT_EXEC); { CFstsearch_Restart(_this); } return O_K; }
INT16 CDlpFile_OnFlistDataChanged(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); { _this->m_nLen = CData_GetNRecs(AS(CData,_this->m_idFlistData)); } return O_K; }
INT16 CHelloworld_OnGreetingGermanChanged(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CHelloworld,NOT_EXEC); { if (!dlp_strlen(_this->m_greetingGerman)) return IERROR(_this,PAR_ERROR,"greeting_german",0,0); } return O_K; }
/*{{CGEN_CFCCF */ INT16 CDlpFile_OnExtChanged(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); { /* Remove leading dots */ while (_this->m_lpsExt[0] == '.') memmove(_this->m_lpsExt,&_this->m_lpsExt[1],dlp_strlen(_this->m_lpsExt)); } return O_K; }
INT16 CDlpFile_Serialize(CDlpObject* __this, CDN3Stream* lpDest) { GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); { /*{{CGEN_SAVECODE */ return SAVE; /*}}CGEN_SAVECODE */ } return O_K; }
INT16 CHelloworld_Copy(CDlpObject* __this, CDlpObject* __iSrc) { GET_THIS_VIRTUAL_RV(CHelloworld,NOT_EXEC); { /*{{CGEN_COPYCODE */ return COPY; /*}}CGEN_COPYCODE */ } return O_K; }
INT16 CHelloworld_ClassProc(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CHelloworld,NOT_EXEC); { /*{{CGEN_CLASSCODE */ return CLASSPROC; /*}}CGEN_CLASSCODE */ } return O_K; }
INT16 CFsttools_Copy(CDlpObject* __this, CDlpObject* __iSrc) { GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); { /*{{CGEN_COPYCODE */ return COPY; /*}}CGEN_COPYCODE */ } return O_K; }
INT16 CDlpFile_Deserialize(CDlpObject* __this, CDN3Stream* lpSrc) { GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); { /*{{CGEN_RESTORECODE */ return RESTORE; /*}}CGEN_RESTORECODE */ } return O_K; }
INT16 CFsttools_DeserializeXml(CDlpObject* __this, CXmlStream* lpSrc) { GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); { /*{{CGEN_RESTORECODE */ return RESTORE; /*}}CGEN_RESTORECODE */ } return O_K; }
INT16 CFsttools_ClassProc(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); { /*{{CGEN_CLASSCODE */ return CLASSPROC; /*}}CGEN_CLASSCODE */ } return O_K; }
INT16 CFsttools_SerializeXml(CDlpObject* __this, CXmlStream* lpDest) { GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); { /*{{CGEN_SAVECODE */ return SAVE; /*}}CGEN_SAVECODE */ } return O_K; }
INT16 CFvrtools_ResetAllOptions(CDlpObject* __this, BOOL bInit) { GET_THIS_VIRTUAL_RV(CFvrtools,NOT_EXEC); DEBUGMSG(-1,"CFvrtools_ResetAllOptions;",0,0,0); { /*{{CGEN_RESETALLOPTIONS*/ /*}}CGEN_RESETALLOPTIONS*/ } return INVOKE_BASEINST_1(ResetAllOptions,bInit); }
INT16 CFstsearch_AutoRegisterWords(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CFstsearch,NOT_EXEC); DEBUGMSG(-1,"CFstsearch_AutoRegisterWords",0,0,0); /* Call base class implementation */ IF_NOK(INVOKE_BASEINST_0(AutoRegisterWords)) return NOT_EXEC; /*{{CGEN_REGISTERWORDS */ /* Register methods */ REGISTER_METHOD("-backtrack","",LPMF(CFstsearch,OnBacktrack),"Backtrack from the current decoding state",0,"<fst itDst> <fstsearch this>","") REGISTER_METHOD("-isearch","",LPMF(CFstsearch,OnIsearch),"Iterative search: decode frames in idWeights",0,"<data idWeights> <fstsearch this>","") REGISTER_METHOD("-load","",LPMF(CFstsearch,OnLoad),"Load the source automaton",0,"<fst itSrc> <long nUnit> <fstsearch this>","") REGISTER_METHOD("-restart","",LPMF(CFstsearch,OnRestart),"Reset iterative search",0,"<fstsearch this>","") REGISTER_METHOD("-search","",LPMF(CFstsearch,OnSearch),"All steps in one method",0,"<fst itSrc> <long nUnit> <data idWeights> <fst itDst> <fstsearch this>","") REGISTER_METHOD("-status","",LPMF(CFstsearch,OnStatus),"Prints status information of the search processor.",0,"<fstsearch this>","") /* Register options */ REGISTER_OPTION("/fast","",LPMV(m_bFast),NULL,"Do not copy the source automaton for backtracking",0) REGISTER_OPTION("/final","",LPMV(m_bFinal),NULL,"Decode until a final state is reached",0) REGISTER_OPTION("/start","",LPMV(m_bStart),NULL,"Start state in every frame",0) /* Register fields */ REGISTER_FIELD("algo","",LPMV(m_lpsAlgo),LPMF(CFstsearch,OnAlgoChanged),"Search algorithm to use",0,5000,1,"string","tp") REGISTER_FIELD("as_aheutype","",LPMV(m_lpsAsAheutype),LPMF(CFstsearch,OnAsAheutypeChanged),"Timeinvariant heurisitc type.",0,5000,1,"string","pot") REGISTER_FIELD("as_prnf","",LPMV(m_nAsPrnf),LPMF(CFstsearch,OnAsPrnfChanged),"Frame prune threshold",0,2008,1,"long",(INT64)0) REGISTER_FIELD("as_prnw","",LPMV(m_nAsPrnw),LPMF(CFstsearch,OnAsPrnwChanged),"Weight prune threshold",0,3008,1,"double",(FLOAT64)0) REGISTER_FIELD("as_qsize","",LPMV(m_nAsQsize),LPMF(CFstsearch,OnAsQsizeChanged),"Queue size",0,2008,1,"long",(INT64)0) REGISTER_FIELD("as_sheutype","",LPMV(m_lpsAsSheutype),LPMF(CFstsearch,OnAsSheutypeChanged),"Timevariant heurisitc type.",0,5000,1,"string","min") REGISTER_FIELD("bt","",LPMV(m_lpsBt),LPMF(CFstsearch,OnBtChanged),"Backtrack type",0,5000,1,"string","os") REGISTER_FIELD("glob","",LPMV(m_lpGlob),NULL,"Internal use: Search status",FF_HIDDEN | FF_NOSET | FF_NOSAVE,6000,1,"void*",NULL) REGISTER_FIELD("latprn","",LPMV(m_nLatprn),LPMF(CFstsearch,OnLatprnChanged),"Lattice pruning threshold",0,3008,1,"double",(FLOAT64)0) REGISTER_FIELD("loaded","",LPMV(m_bLoaded),NULL,"TRUE if a transducer is loaded and the decoder ready",FF_NOSET,1000,1,"bool",(BOOL)FALSE) REGISTER_FIELD("mem","",LPMV(m_nMem),NULL,"Memory used for last decoding including backtracking in Bytes",FF_NOSET,3008,1,"double",(FLOAT64)0) REGISTER_FIELD("numpaths","",LPMV(m_nNumpaths),LPMF(CFstsearch,OnNumpathsChanged),"Number of paths to decode",0,2008,1,"long",(INT64)1) REGISTER_FIELD("sdp_epsremove","",LPMV(m_bSdpEpsremove),LPMF(CFstsearch,OnSdpEpsremoveChanged),"Removes epsilon transitions",0,1000,1,"bool",(BOOL)FALSE) REGISTER_FIELD("sdp_fwd","",LPMV(m_bSdpFwd),LPMF(CFstsearch,OnSdpFwdChanged),"Do forward algorithm instead of sdp",0,1000,1,"bool",(BOOL)FALSE) REGISTER_FIELD("sdp_prn","",LPMV(m_nSdpPrn),LPMF(CFstsearch,OnSdpPrnChanged),"Pruning constant",0,3008,1,"double",(FLOAT64)0) REGISTER_FIELD("stkprn","",LPMV(m_bStkprn),LPMF(CFstsearch,OnStkprnChanged),"Prune hypothesis with different pushdown memory",0,1000,1,"bool",(BOOL)FALSE) REGISTER_FIELD("time","",LPMV(m_nTime),NULL,"Time used for last decoding including backtracking in milliseconds (only Linux!)",FF_NOSET,3008,1,"double",(FLOAT64)0) REGISTER_FIELD("tp_prnh","",LPMV(m_nTpPrnh),LPMF(CFstsearch,OnTpPrnhChanged),"Hypothesis number pruning threshold",0,2008,1,"long",(INT64)0) REGISTER_FIELD("tp_prnw","",LPMV(m_nTpPrnw),LPMF(CFstsearch,OnTpPrnwChanged),"Weight pruning threshold",0,3008,1,"double",(FLOAT64)0) REGISTER_FIELD("tp_threads","",LPMV(m_nTpThreads),LPMF(CFstsearch,OnTpThreadsChanged),"Number of threads to use for decoding",0,2008,1,"long",(INT64)1) REGISTER_FIELD("wnorm_dec","",LPMV(m_nWnormDec),LPMF(CFstsearch,OnWnormDecChanged),"Weight normalization decrement",0,3008,1,"double",(FLOAT64)0.5) REGISTER_FIELD("wnorm_off","",LPMV(m_nWnormOff),LPMF(CFstsearch,OnWnormOffChanged),"Weight normalization offset",0,3008,1,"double",(FLOAT64)10) /* Register errors */ REGISTER_ERROR("~e1_0_0__1",EL_ERROR,FSTS_STR,"%s") /*}}CGEN_REGISTERWORDS */ return O_K; }
INT16 CFsttools_Reset(CDlpObject* __this, BOOL bResetMembers) { GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); DEBUGMSG(-1,"CFsttools_Reset; (bResetMembers=%d)",(int)bResetMembers,0,0); { /*{{CGEN_RESETCODE */ RESET; /*}}CGEN_RESETCODE */ } return O_K; }
INT16 CFstsearch_OnRestart(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; GET_THIS_VIRTUAL_RV(CFstsearch,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; __nErr = CFstsearch_Restart(_this); return __nErr; }
INT16 CHelloworld_ResetAllOptions(CDlpObject* __this, BOOL bInit) { GET_THIS_VIRTUAL_RV(CHelloworld,NOT_EXEC); DEBUGMSG(-1,"CHelloworld_ResetAllOptions;",0,0,0); { /*{{CGEN_RESETALLOPTIONS*/ _this->m_bAdm = FALSE; _this->m_bGerman = FALSE; /*}}CGEN_RESETALLOPTIONS*/ } return INVOKE_BASEINST_1(ResetAllOptions,bInit); }
INT16 CDlpFile_OnNext(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; MIC_PUT_S(CDlpFile_Next(_this)); return __nErr; }
INT16 CHelloworld_OnSayhello(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; GET_THIS_VIRTUAL_RV(CHelloworld,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; __nErr = CHelloworld_Sayhello(_this); return __nErr; }
INT16 CFstsearch_ResetAllOptions(CDlpObject* __this, BOOL bInit) { GET_THIS_VIRTUAL_RV(CFstsearch,NOT_EXEC); DEBUGMSG(-1,"CFstsearch_ResetAllOptions;",0,0,0); { /*{{CGEN_RESETALLOPTIONS*/ _this->m_bFast = FALSE; _this->m_bFinal = FALSE; _this->m_bStart = FALSE; /*}}CGEN_RESETALLOPTIONS*/ } return INVOKE_BASEINST_1(ResetAllOptions,bInit); }
/*{{CGEN_CPMIC */ INT16 CFstsearch_OnBacktrack(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; fst* itDst; GET_THIS_VIRTUAL_RV(CFstsearch,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); itDst = MIC_GET_I_EX(itDst,fst,1,1); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; __nErr = CFstsearch_Backtrack(_this, itDst); return __nErr; }
INT16 CFstsearch_OnIsearch(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; data* idWeights; GET_THIS_VIRTUAL_RV(CFstsearch,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); idWeights = MIC_GET_I_EX(idWeights,data,1,1); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; __nErr = CFstsearch_Isearch(_this, idWeights); return __nErr; }
INT16 CFsttools_OnRemoveMl2(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; fst* itR; GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); itR = MIC_GET_I_EX(itR,fst,1,1); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; __nErr = CFsttools_RemoveMl2(_this, itR); return __nErr; }
INT16 CDlpFile_OnGetRootClass(CDlpObject* __this) /* DO NOT CALL THIS FUNCTION FROM C++ SCOPE. */ /* IT MAY INTERFERE WITH THE INTERPRETER SESSION */ { INT16 __nErr = O_K; INT32 __nErrCnt = 0; char* sFilename; GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); MIC_CHECK; __nErrCnt = CDlpObject_GetErrorCount(); sFilename = MIC_GET_S(1,0); if (CDlpObject_GetErrorCount()>__nErrCnt) return NOT_EXEC; MIC_PUT_S(CDlpFile_GetRootClass(_this, sFilename)); return __nErr; }
INT16 CDlpFile_OnPathChanged(CDlpObject* __this) { GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC); { /* Remove tailing slashes/backslashes */ char* tx = &_this->m_lpsPath[dlp_strlen(_this->m_lpsPath)-1]; while (*tx == '\\' || *tx == '/') { *tx = 0; if (tx == _this->m_lpsPath) break; tx--; } } return O_K; }
INT16 CFvrtools_Init(CDlpObject* __this, BOOL bCallVirtual) { GET_THIS_VIRTUAL_RV(CFvrtools,NOT_EXEC); DEBUGMSG(-1,"CFvrtools_Init, (bCallVirtual=%d)",(int)bCallVirtual,0,0); { /*{{CGEN_INITCODE */ INIT; /*}}CGEN_INITCODE */ } /* If last derivation call reset (do not reset members; already done by Init()) */ #ifndef __NORTTI if (bCallVirtual) return INVOKE_VIRTUAL_1(Reset,FALSE); else #endif return O_K; }