Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
INT16 CPMproc::AutoRegisterWords()
{
    DEBUGMSG(-1,"CPMproc::AutoRegisterWords",0,0,0);
    IF_NOK(inherited::AutoRegisterWords()) return NOT_EXEC;

    //{{CGEN_REGISTERWORDS

    // Register methods
    REGISTER_METHOD("-analyze","",LPMF(CPMproc,OnAnalyze),"Run pitch marking.",0,"<data idSignal> <data idPitch> <PMproc this>","")
    REGISTER_METHOD("-compress_pm","",LPMF(CPMproc,OnCompressPm),"Expand/reduce number of pitch markers to new number.",0,"<data idSrc> <data idDst> <int n> <PMproc this>","")
    REGISTER_METHOD("-expand_pm","",LPMF(CPMproc,OnExpandPm),"Expand/reduce number of pitch markers to fit new target sum of period length.",0,"<data idSrc> <data idDst> <int n> <PMproc this>","")
    REGISTER_METHOD("-f02pm","",LPMF(CPMproc,OnF02pm),"Convert f0-contour with equal spaced sampling points to pitch markers.",0,"<data idSrc> <data idDst> <int n> <int srate> <PMproc this>","")
    REGISTER_METHOD("-fill","",LPMF(CPMproc,OnFill),"Add periods to reach desired sum od periods.",0,"<data idSrc> <data idDst> <int n> <cstring method> <PMproc this>","")
    REGISTER_METHOD("-pm2f0","",LPMF(CPMproc,OnPm2f0),"Convert (unequal spaced) pitch markers to f0-contour with equal spaced sampling points.",0,"<data idSrc> <data idDst> <int n> <int srate> <PMproc this>","")

    // Register options
    REGISTER_OPTION("/chfa","",LPMV(m_bChfa),NULL,"Compute pitch markers using Complex Harmonic Filter Analysis (CHFA).",0)
    REGISTER_OPTION("/epochdetect","",LPMV(m_bEpochdetect),NULL,"Compute pitch markers using EpochDetect method.",0)
    REGISTER_OPTION("/gcida","",LPMV(m_bGcida),NULL,"Compute pitch markers using GCIDA.",0)
    REGISTER_OPTION("/hybrid","",LPMV(m_bHybrid),NULL,"Compute pitch markers using hybrid method.",0)

    // Register fields
    REGISTER_FIELD("filt_b_i","",LPMV(m_lpFiltBI),NULL,"Internal filter table.",FF_HIDDEN | FF_NOSET | FF_NONAUTOMATIC,6000,1,"double**",NULL)
    REGISTER_FIELD("filt_b_r","",LPMV(m_lpFiltBR),NULL,"Internal filter table.",FF_HIDDEN | FF_NOSET | FF_NONAUTOMATIC,6000,1,"double**",NULL)
    REGISTER_FIELD("level","",LPMV(m_nLevel),NULL,"Adjust voiceless/voiced decision. Higher values produce more voiceless periods.",0,3008,1,"double",(FLOAT64)2.0)
    REGISTER_FIELD("max","",LPMV(m_nMax),LPMF(CPMproc,OnMaxChanged),"Maximum base F0.",0,2002,1,"short",(INT16)400)
    REGISTER_FIELD("mean","",LPMV(m_nMean),NULL,"Mean base F0.",0,2002,1,"short",(INT16)100)
    REGISTER_FIELD("min","",LPMV(m_nMin),LPMF(CPMproc,OnMinChanged),"Minimum base F0.",0,2002,1,"short",(INT16)50)
    REGISTER_FIELD("srate","",LPMV(m_nSrate),NULL,"Sample rate.",0,2004,1,"int",(INT32)16000)

    // Register errors
    REGISTER_ERROR("~e1_0_0__1",EL_ERROR,PM_SIGLENGTH,"To many voiced segments (%d). Reduce the length of speech signal.")
    REGISTER_ERROR("~e2_0_0__1",EL_ERROR,PM_FFTSIZE,"Precomputed trig tables are not big enough in fft (%d < %d).")
    //}}CGEN_REGISTERWORDS

    return O_K;
}
Ejemplo n.º 3
0
INT16 CFvrtools_AutoRegisterWords(CDlpObject* __this)
{
	GET_THIS_VIRTUAL_RV(CFvrtools,NOT_EXEC);
	DEBUGMSG(-1,"CFvrtools_AutoRegisterWords",0,0,0);

	/* Call base class implementation */
	IF_NOK(INVOKE_BASEINST_0(AutoRegisterWords)) return NOT_EXEC;

	/*{{CGEN_REGISTERWORDS */

	/* Register methods */
	REGISTER_METHOD("-from_string","",LPMF(CFvrtools,OnFromString),"Creates a (weighted) FVR from a string representation",0,"<string src> <fst itFvr> <fvrtools this>","")
	REGISTER_METHOD("-is_fvr","",LPMF(CFvrtools,OnIsFvr),"Determines if the argument is an FVR",0,"<int nU> <fst itFvr> <fvrtools this>","")
	REGISTER_METHOD("-synthesize","",LPMF(CFvrtools,OnSynthesize),"Creates a list of all possible combinations from a FVR",0,"<fst itDst> <fst itFvr> <fvrtools this>","")

	/* Register errors */
	REGISTER_ERROR("~e1_0_0__1",EL_ERROR,FVRT_SEQSYNTAX,"FVR string or sequence syntax error (%s)")
	REGISTER_ERROR("~e2_0_0__1",EL_ERROR,FVRT_NOTFVR,"'%s' is not a feature-value relation")
	REGISTER_ERROR("~e3_0_0__1",EL_WARNING,FVRT_EXTRATIS,"Ignored extra input symbol '%s' at transition %ld")
	REGISTER_ERROR("~e4_0_0__1",EL_WARNING,FVRT_NOTIS,"No input symbol at transition %ld")
	/*}}CGEN_REGISTERWORDS */

	return O_K;
}
Ejemplo n.º 4
0
INT16 CFWTproc::AutoRegisterWords()
{
    DEBUGMSG(-1,"CFWTproc::AutoRegisterWords",0,0,0);
    IF_NOK(inherited::AutoRegisterWords()) return NOT_EXEC;

    //{{CGEN_REGISTERWORDS
    REGISTER_METHOD("-analyze","",LPMF(CFWTproc,OnAnalyze),"Run DWT.",0,"<data idSignal> <data idPitch> <data idReal> <data idImag> <FWTproc this>","")
    REGISTER_METHOD("-get_coef","",LPMF(CFWTproc,OnGetCoef),"Get scaling function coefficients of configured wavelet type ({@link wvltype})",0,"<data idCoef> <FWTproc this>","")
    REGISTER_METHOD("-synthesize","",LPMF(CFWTproc,OnSynthesize),"Convert scaling function and wavelet coefficients to signal.",0,"<data idTrans> <data idSignal> <FWTproc this>","")
    REGISTER_FIELD("level","",LPMV(m_nLevel),NULL,"Transformation detail level. (max. level (default) = -1; If defined          level is greater then possible transformation depth, transformation          provides with max. detail level.)",0,2002,1,"short",(INT16)-1)
    REGISTER_FIELD("wvltype","",LPMV(m_lpsWvltype),NULL,"Wavelet type (available values: haar,d2,d4,d6,...,d20)",0,5000,1,"string","d4")
    REGISTER_ERROR("~e8_1_0__1",EL_ERROR,FWT_DIM_ERROR,"Length of frame %d isn't 2^n.")
    //}}CGEN_REGISTERWORDS

    return O_K;
}
Ejemplo n.º 5
0
INT16 CCPproc::AutoRegisterWords()
{
	DEBUGMSG(-1,"CCPproc::AutoRegisterWords",0,0,0);
	IF_NOK(inherited::AutoRegisterWords()) return NOT_EXEC;

	//{{CGEN_REGISTERWORDS
	REGISTER_METHOD("-analyze","",LPMF(CCPproc,OnAnalyze),"Run cepstral analysis.",0,"<data idSignal> <data idPitch> <data idReal> <data idImag> <CPproc this>","")
	REGISTER_METHOD("-dequantize","",LPMF(CCPproc,Dequantize),"This is the inverse of -quantize.",0,"<data idFea> <int first> <int count> <int bitwidth> <CPproc this>","")
	REGISTER_METHOD("-quantize","",LPMF(CCPproc,Quantize),"Feature dependent quantization for (lossy) converting to fixpoint type of specified bit width.",0,"<data idFea> <int first> <int count> <int bitwidth> <CPproc this>","")
	REGISTER_METHOD("-status","",LPMF(CCPproc,Status),"Display status information.",0,"<CPproc this>","")
	REGISTER_FIELD("warptype","",LPMV(m_lpsWarptype),NULL,"Type of cepstral warping.",0,255,255,"char[255]","none")
	REGISTER_ERROR("~e8_1_0__1",EL_ERROR,CP_WARPTYPE,"Warp type %s is not applicable to the desired analysis type.")
	//}}CGEN_REGISTERWORDS

	return O_K;
}
Ejemplo n.º 6
0
INT16 CFsttools_AutoRegisterWords(CDlpObject* __this)
{
    GET_THIS_VIRTUAL_RV(CFsttools,NOT_EXEC);
    DEBUGMSG(-1,"CFsttools_AutoRegisterWords",0,0,0);

    /* Call base class implementation */
    IF_NOK(INVOKE_BASEINST_0(AutoRegisterWords)) return NOT_EXEC;

    /*{{CGEN_REGISTERWORDS */

    /* Register methods */
    REGISTER_METHOD("-compute_path","",LPMF(CFsttools,OnComputePath),"computes path weights for path length nIt",0,"<data idTrans> <long nIt> <data idPath> <fst itFst> <fsttools this>","")
    REGISTER_METHOD("-getlogprob","",LPMF(CFsttools,OnGetlogprob),"Get logarithmic probability of N-gram",0,"<short nSeqLen> <data idSeq> <long nUnit> <fst itFst> <fsttools this>","")
    REGISTER_METHOD("-lm_add_input_trans","",LPMF(CFsttools,OnLmAddInputTrans),"Insert input transitions into states for composition",0,"<fst itLM> <long nUnit> <fsttools this>","")
    REGISTER_METHOD("-lm_cluster_classes","",LPMF(CFsttools,OnLmClusterClasses),"Clusters words of a language model fst into classes",0,"<fst itLM> <long nNClass> <long nNLoops> <data idClassMap> <fsttools this>","")
    REGISTER_METHOD("-nmg2lm","",LPMF(CFsttools,OnNmg2lm),"Convert n-multi-gram fst into language model fst (composable with lexicon, acoustic model)",0,"<fst itSrc> <long nUnit> <long nNGram> <fst itDst> <fsttools this>","")
    REGISTER_METHOD("-one_tis_per_path","",LPMF(CFsttools,OnOneTisPerPath),"Each input symbol only once per path",0,"<long nUnit> <fst itFst> <fsttools this>","")
    REGISTER_METHOD("-rc_by_used_path","",LPMF(CFsttools,OnRcByUsedPath),"Adds trans.RCs and pathweight to histroy or initializes new trans.RCs from history",0,"<data idTransRC> <double nPathWeight> <long nUnit> <BOOL bReset> <data idUnitTransCount> <fst itFst> <fsttools this>","")
    REGISTER_METHOD("-remove_ex_loops","",LPMF(CFsttools,OnRemoveExLoops),"remove all follwing transitions with the same input symbol",0,"<long nUnit> <fst itFst> <fsttools this>","")
    REGISTER_METHOD("-remove_ml2","",LPMF(CFsttools,OnRemoveMl2),"Remove ml2 compostion transitions",0,"<fst itR> <fsttools this>","")
    REGISTER_METHOD("-restore_loops","",LPMF(CFsttools,OnRestoreLoops),"restores loops according to that in itSrc",0,"<fst itSrc> <long nUnit> <fst itDst> <fsttools this>","")
    REGISTER_METHOD("-smooth","",LPMF(CFsttools,OnSmooth),"(Re-)Estimates transition propabilities, add fallback transitions",0,"<short nKGt> <double nDelta> <long nUnit> <fst itFst> <fsttools this>","")
    REGISTER_METHOD("-sum_comp_id","",LPMF(CFsttools,OnSumCompId),"Sum component values according index comp. Cid (DstRecs = max index)",0,"<data Src> <long Cid> <long DstRecs> <data Dst> <fsttools this>","")

    /* Register options */
    REGISTER_OPTION("/add","",LPMV(m_bAdd),NULL,"Add-Delta-Smoothing",0)
    REGISTER_OPTION("/gt","",LPMV(m_bGt),NULL,"Good-Turing-Smoothing",0)
    REGISTER_OPTION("/wb","",LPMV(m_bWb),NULL,"Witten-Bell-Smoothing",0)

    /* Register errors */
    REGISTER_ERROR("~e1_0_0__1",EL_ERROR,FSTTOOLS_NOMEM,"Not enough memory available.")
    REGISTER_ERROR("~e2_0_0__1",EL_ERROR,FSTTOOLS_ARGUMENT,"Wrong type of argument '%s'.")
    REGISTER_ERROR("~e3_0_0__1",EL_ERROR,FSTTOOLS_NULL,"Argument '%s' must not be NULL.")
    REGISTER_ERROR("~e4_0_0__1",EL_ERROR,FSTTOOLS_EMPTY,"Argument '%s' must not be empty.")
    REGISTER_ERROR("~e5_0_0__1",EL_ERROR,FSTTOOLS_MISSCOMP,"Component %d not found in '%s'.")
    REGISTER_ERROR("~e6_0_0__1",EL_ERROR,FSTTOOLS_COMPTYPE,"Component %d in '%s' is not of %s type.")
    REGISTER_ERROR("~e7_0_0__1",EL_ERROR,FSTTOOLS_STAT,"Mean and covariances do not fit.")
    REGISTER_ERROR("~e8_0_0__1",EL_ERROR,FSTTOOLS_MAPPING_FAILED,"Mapping of state index for record %d failed.")
    /*}}CGEN_REGISTERWORDS */

    return O_K;
}
Ejemplo n.º 7
0
INT16 CHelloworld_AutoRegisterWords(CDlpObject* __this)
{
	GET_THIS_VIRTUAL_RV(CHelloworld,NOT_EXEC);
	DEBUGMSG(-1,"CHelloworld_AutoRegisterWords",0,0,0);

	/* Call base class implementation */
	IF_NOK(INVOKE_BASEINST_0(AutoRegisterWords)) return NOT_EXEC;

	/*{{CGEN_REGISTERWORDS */

	/* Register methods */
	REGISTER_METHOD("-dm","",LPMF(CHelloworld,OnDm),"Delta modulation example",0,"<data idSrc> <long nOversample> <data idDst> <Helloworld this>","")
	REGISTER_METHOD("-sayhello","",LPMF(CHelloworld,OnSayhello),"Says hello to the user.",0,"<Helloworld this>","")

	/* Register options */
	REGISTER_OPTION("/adm","",LPMV(m_bAdm),NULL,"Adaptive delta modulation (method -dm)",0)
	REGISTER_OPTION("/german","",LPMV(m_bGerman),LPMF(CHelloworld,OnGermanSet),"switch to german",0)

	/* Register fields */
	REGISTER_FIELD("field_bool","",LPMV(m_fieldBool),NULL,"Just a field of type bool.",0,1000,1,"bool",(BOOL)0)
	REGISTER_FIELD("field_char","",LPMV(m_fieldChar),NULL,"Just a field of type char.",0,2001,1,"char",(char)0)
	REGISTER_FIELD("field_data","",LPMV(m_fieldData),NULL,"Just a field of type data.",0,6002,1,"data",NULL)
	REGISTER_FIELD("field_double","",LPMV(m_fieldDouble),NULL,"Just a field of type double.",0,3008,1,"double",(FLOAT64)0.0)
	REGISTER_FIELD("field_float","",LPMV(m_fieldFloat),NULL,"Just a field of type float.",0,3004,1,"float",(FLOAT32)0.0)
	REGISTER_FIELD("field_long","",LPMV(m_fieldLong),NULL,"Just a field of type long.",0,2008,1,"long",(INT64)0)
	REGISTER_FIELD("field_short","",LPMV(m_fieldShort),NULL,"Just a field of type short.",0,2002,1,"short",(INT16)0)
	REGISTER_FIELD("field_uchar","",LPMV(m_fieldUchar),NULL,"Just a field of type unsigned char.",0,1001,1,"unsigned char",(UINT8)0)
	REGISTER_FIELD("field_ulong","",LPMV(m_fieldUlong),NULL,"Just a field of type unsigned long.",0,1008,1,"unsigned long",(UINT64)0)
	REGISTER_FIELD("field_ushort","",LPMV(m_fieldUshort),NULL,"Just a field of type unsigned short.",0,1002,1,"unsigned short",(UINT16)0)
	REGISTER_FIELD("greeting_english","",LPMV(m_greetingEnglish),LPMF(CHelloworld,OnGreetingEnglishChanged),"English greeting text.",0,5000,1,"string","Hello World!")
	REGISTER_FIELD("greeting_german","",LPMV(m_greetingGerman),LPMF(CHelloworld,OnGreetingGermanChanged),"German greeting text.",0,5000,1,"string","Hallo Welt!")

	/* Register errors */
	REGISTER_ERROR("~e1_0_0__1",EL_ERROR,PAR_ERROR,"Failed to set parameter %s.")
	/*}}CGEN_REGISTERWORDS */

	return O_K;
}
Ejemplo n.º 8
0
INT16 CDlpFile_AutoRegisterWords(CDlpObject* __this)
{
	GET_THIS_VIRTUAL_RV(CDlpFile,NOT_EXEC);
	DEBUGMSG(-1,"CDlpFile_AutoRegisterWords",0,0,0);

	/* Call base class implementation */
	IF_NOK(INVOKE_BASEINST_0(AutoRegisterWords)) return NOT_EXEC;

	/*{{CGEN_REGISTERWORDS */

	/* Register methods */
	REGISTER_METHOD("-exists","",LPMF(CDlpFile,OnExists),"Checks if directory exists",0,"<string sFilename> <file this>","")
	REGISTER_METHOD("-export","",LPMF(CDlpFile,OnExport),"Exports an instance to a non-native file format",0,"<cstring sFilename> <cstring sFilter> <instance iInst> <file this>","")
	REGISTER_METHOD("-get_root_class","",LPMF(CDlpFile,OnGetRootClass),"Reads root class from dn3 or xml file",0,"<string sFilename> <file this>","")
	REGISTER_METHOD("-getlen","",LPMF(CDlpFile,OnGetlen),"Return number of items in file list.",0,"<file this>","")
	REGISTER_METHOD("-import","",LPMF(CDlpFile,OnImport),"Imports an instance from a non-native file format",0,"<cstring sFilename> <cstring sFilter> <instance iInst> <file this>","")
	REGISTER_METHOD("-list","",LPMF(CDlpFile,OnList),"Lists available import and export filters.",0,"<file this>","")
	REGISTER_METHOD("-next","",LPMF(CDlpFile,OnNext),"Push next file in list to string stack.",0,"<file this>","")
	REGISTER_METHOD("-partition","",LPMF(CDlpFile,OnPartition),"Partitiones a file list",0,"<file iSrc> <double nPartSize> <int nPartNum> <file this>","")

	/* Register options */
	REGISTER_OPTION("/append","",LPMV(m_bAppend),NULL,"Do append to (existing) file while exporting",0)
	REGISTER_OPTION("/big","",LPMV(m_bBig),NULL,"Import raw data in big endian format.",0)
	REGISTER_OPTION("/compress","",LPMV(m_bCompress),NULL,"Compressed import/export",0)
	REGISTER_OPTION("/dir","",LPMV(m_bDir),NULL,"Directory mode",0)
	REGISTER_OPTION("/execute","",LPMV(m_bExecute),NULL,"Do execute command instead of opening file",0)
	REGISTER_OPTION("/little","",LPMV(m_bLittle),NULL,"Import raw data in little endian format.",0)
	REGISTER_OPTION("/pst_comma","",LPMV(m_bPstComma),NULL,"Plot German style numbers.",0)
	REGISTER_OPTION("/pst_contour","",LPMV(m_bPstContour),NULL,"Plots contour for PSTricks export.",0)
	REGISTER_OPTION("/pst_halfspectrum","",LPMV(m_bPstHalfspectrum),NULL,"Plot left-side of spectrum for PSTricks export.",0)
	REGISTER_OPTION("/pst_legend","",LPMV(m_bPstLegend),NULL,"Plot a legend for PSTricks export.",0)
	REGISTER_OPTION("/pst_triglabels","",LPMV(m_bPstTriglabels),NULL,"Plot trigonometric labels for PSTricks export.",0)
	REGISTER_OPTION("/pst_x_y_plot","",LPMV(m_bPstXYPlot),NULL,"XY-Plot for PSTricks export.",0)
	REGISTER_OPTION("/reverse","",LPMV(m_bReverse),NULL,"Reverse byte order in raw import",0)
	REGISTER_OPTION("/strings","",LPMV(m_bStrings),NULL,"Determine only string columns while ascii-import",0)
	REGISTER_OPTION("/transpose","",LPMV(m_bTranspose),NULL,"Interchange rows and columns for ascii-export.",0)
	REGISTER_OPTION("/zip","",LPMV(m_bZip),NULL,"Zip after export",0)

	/* Register fields */
	REGISTER_FIELD("comment","",LPMV(m_lpsComment),NULL,"Comment marker used for import and export of ASCII files.",0,10,10,"char[10]","#")
	REGISTER_FIELD("ext","",LPMV(m_lpsExt),LPMF(CDlpFile,OnExtChanged),"File extension to succeed file list items.",0,32,32,"char[32]","")
	REGISTER_FIELD("flist","",LPMV(m_lpsFlist),LPMF(CDlpFile,OnFlistChanged),"Filename of file list.",0,255,255,"char[255]","")
	REGISTER_FIELD("flist_data","",LPMV(m_idFlistData),LPMF(CDlpFile,OnFlistDataChanged),"File list data field.",0,6002,1,"data",NULL)
	REGISTER_FIELD("ftypes","",LPMV(m_lpFtypes),NULL,"List of known file types for export and import of non-native files.",FF_HIDDEN | FF_NOSET | FF_NOSAVE | FF_NONAUTOMATIC,6000,1,"list_t*",NULL)
	REGISTER_FIELD("len","",LPMV(m_nLen),NULL,"Length of file list",FF_NOSET,2004,1,"int",(INT32)0)
	REGISTER_FIELD("line_flt","",LPMV(m_lpsLineFlt),NULL,"Line filter used for import and export of ASCII files.",0,32,32,"char[32]","")
	REGISTER_FIELD("nfile","",LPMV(m_nNfile),NULL,"Current zero-based file index in file list.",FF_NOSET,2004,1,"int",(INT32)-1)
	REGISTER_FIELD("path","",LPMV(m_lpsPath),LPMF(CDlpFile,OnPathChanged),"Path to preceed file list items.",0,255,255,"char[255]","")
	REGISTER_FIELD("raw_head","",LPMV(m_nRawHead),NULL,"Number of bytes to skip importing raw files.",0,2008,1,"long",(INT64)0)
	REGISTER_FIELD("recfile","",LPMV(m_idRecfile),NULL,"Current record in file list (including extra components)",FF_NOSET,6002,1,"data",NULL)
	REGISTER_FIELD("sep","",LPMV(m_lpsSep),NULL,"List of separators used for import/export of ASCII files.",0,10,10,"char[10]","\t ")
	REGISTER_FIELD("sfile","current_file",LPMV(m_lpsSfile),NULL,"Current file name in file list without path and extension.",FF_NOSET,255,255,"char[255]","")
	REGISTER_FIELD("sfile_fq","current_full_name",LPMV(m_lpsSfileFq),NULL,"Current file name in file list including path and extension.",FF_NOSET,255,255,"char[255]","")

	/* Register errors */
	REGISTER_ERROR("~e1_0_0__1",EL_ERROR,FIL_NEEDFL,"Need a file list (parameter <flist>).")
	REGISTER_ERROR("~e2_0_0__1",EL_ERROR,FIL_FILENAME,"No filename specified.")
	REGISTER_ERROR("~e3_0_0__1",EL_ERROR,FIL_NOIMEX,"No %s method for '%s' file into '%s' instance.")
	REGISTER_ERROR("~e4_0_0__1",EL_ERROR,FIL_IMPORT,"Failed to import file '%s' using filter '%s'.")
	REGISTER_ERROR("~e5_0_0__1",EL_ERROR,FIL_NOEXPORT,"No export method for '%s' file from '%s' instance.")
	REGISTER_ERROR("~e6_0_0__1",EL_ERROR,FIL_EXPORT,"Failed to export file '%s' using filter '%s'.")
	REGISTER_ERROR("~e7_0_0__1",EL_ERROR,FIL_PROCESS,"Error while %s file %s.")
	REGISTER_ERROR("~e8_0_0__1",EL_ERROR,FIL_FORMAT,"Format error in file %s of type %s (%s).")
	REGISTER_ERROR("~e9_0_0__1",EL_WARNING,FIL_FORMATW,"Format error in file %s of type %s (%s).")
	REGISTER_ERROR("~e0_1_0__1",EL_ERROR,FIL_FORMATCOMPS,"All numeric components of %s must be of same type.")
	REGISTER_ERROR("~e1_1_0__1",EL_ERROR,FIL_FSR,"No valid continuation rate specified. Please set field 'fsr' of instance '%s' accordingly.")
	REGISTER_ERROR("~e2_1_0__1",EL_WARNING,FIL_PHD_SMM,"Counted samples incorrect (%ld != %ld).")
	REGISTER_ERROR("~e3_1_0__1",EL_WARNING,FIL_PHD_EMPTY_HEADER,"Invalid header detected. Assuming 16kHz data.")
	REGISTER_ERROR("~e4_1_0__1",EL_ERROR,FIL_NOTIMPL,"%s is not implemented.")
	REGISTER_ERROR("~e5_1_0__1",EL_ERROR,FIL_BADTYPE,"Component %d of %s must be of %s type.")
	REGISTER_ERROR("~e6_1_0__1",EL_ERROR,FIL_BADCOMPS,"Instance %s must must have %d components.")
	REGISTER_ERROR("~e7_1_0__1",EL_ERROR,IC_TIS_NOT_SET,"Field ic_tis in structure %s must be bigger than 1.")
	REGISTER_ERROR("~e8_1_0__1",EL_ERROR,FIL_DLP,"Need dLabPro interpreter.")
	REGISTER_ERROR("~e9_1_0__1",EL_WARNING,FIL_REMOVE,"Cannot remove %sfile '%s'.")
	REGISTER_ERROR("~e0_2_0__1",EL_ERROR,FIL_EXEC,"Cannot execute shell command '%s'. Check path.")
	REGISTER_ERROR("~e1_2_0__1",EL_ERROR,FIL_NOTFOUND,"Cannot find %s.")
	REGISTER_ERROR("~e2_2_0__1",EL_ERROR,FIL_WAV_MISS,"File %s doesn't contain %s!")
	REGISTER_ERROR("~e3_2_0__1",EL_ERROR,FIL_INVALARG,"Invalid argument (%s).")
	REGISTER_ERROR("~e4_2_0__1",EL_WARNING,FIL_OPTION,"Option %s will be ignored due to %s.")
	/*}}CGEN_REGISTERWORDS */

	return O_K;
}
Ejemplo n.º 9
0
INT16 CDgen::AutoRegisterWords()
{
	DEBUGMSG(-1,"CDgen::AutoRegisterWords",0,0,0);
	IF_NOK(inherited::AutoRegisterWords()) return NOT_EXEC;

	//{{CGEN_REGISTERWORDS

	// Register methods
	REGISTER_METHOD("-edit_section","",LPMF(CDgen,OnEditSection),"Edits text between two markers in generated document.",0,"<string sMarkOn> <string sMarkOff> <data idText> <string sOpname> <DGen this>","")
	REGISTER_METHOD("-load","",LPMF(CDgen,OnLoad),"Load document template.",0,"<string sFilename> <DGen this>","")
	REGISTER_METHOD("-parse","",LPMF(CDgen,OnParse),"Parse token sequence (field tsq)",0,"<string sParser> <fst itDeps> <int nFtok> <int nLtok> <DGen this>","")
	REGISTER_METHOD("-scan","",LPMF(CDgen,OnScan),"For convenience: -tokenize plus -parse",0,"<string sFilename> <string sParser> <fst itDeps> <DGen this>","")
	REGISTER_METHOD("-setup","",LPMF(CDgen,OnSetup),"Load default parameter set for given parser",0,"<string sParser> <DGen this>","")
	REGISTER_METHOD("-table","",LPMF(CDgen,OnTable),"Adds table data to HTML page",0,"<data idTable> <string sPre> <string sDel> <string sSuf> <DGen this>","")
	REGISTER_METHOD("-tokenize","",LPMF(CDgen,OnTokenize),"Tokenize source file",0,"<string sFilename> <DGen this>","")
	REGISTER_METHOD("-write","",LPMF(CDgen,OnWrite),"Write HTML page to file",0,"<string sFilename> <DGen this>","")
	REGISTER_METHOD("<%","",LPMF(CDgen,HereScript),"Add HTML code (here script) to HTML page",0,"<DGen this>","... %>")
	REGISTER_METHOD(">>","",LPMF(CDgen,OnAddText),"Add text to HTML page",0,"<string sText> <DGen this>","")

	// Register options
	REGISTER_OPTION("/bare","",LPMV(m_bBare),NULL,"Ignore prefixes and suffixes.",0)

	// Register fields
	REGISTER_FIELD("bcmtoff","",LPMV(m_lpsBcmtoff),NULL,"Block comment mark (end)",0,8,8,"char[8]","")
	REGISTER_FIELD("bcmton","",LPMV(m_lpsBcmton),NULL,"Block comment mark (start)",0,8,8,"char[8]","")
	REGISTER_FIELD("chrs","",LPMV(m_bChrs),NULL,"Get character strings in single quotation marks as tokens.",0,2002,1,"short",(INT16)TRUE)
	REGISTER_FIELD("dcmt","",LPMV(m_lpsDcmt),NULL,"Documentation comment",0,8,8,"char[8]","##")
	REGISTER_FIELD("dom","",LPMV(m_idDom),NULL,"Document object model",FF_NOSET,6002,1,"data",NULL)
	REGISTER_FIELD("drct","",LPMV(m_lpsDrct),NULL,"Compiler directive (entire line will be one token)",0,8,8,"char[8]","")
	REGISTER_FIELD("filename","",LPMV(m_lpsFilename),NULL,"Most recently tokenized file",FF_NOSET,255,255,"char[255]","")
	REGISTER_FIELD("gen","",LPMV(m_idGen),NULL,"Generated document",FF_NOSET,6002,1,"data",NULL)
	REGISTER_FIELD("grany","",LPMV(m_nGrany),NULL,"Memory allocation granularity",FF_NOSET,2004,1,"int",(INT32)100)
	REGISTER_FIELD("idel","",LPMV(m_lpsIdel),LPMF(CDgen,OnIdelChanged),"Insignificant token delimiter characters",0,64,64,"char[64]"," \t")
	REGISTER_FIELD("lcmt","",LPMV(m_lpsLcmt),NULL,"One line comment mark ('til end of line)",0,8,8,"char[8]","#")
	REGISTER_FIELD("sdel","",LPMV(m_lpsSdel),LPMF(CDgen,OnSdelChanged),"Significant token delimiter characters",0,64,64,"char[64]","")
	REGISTER_FIELD("spl","",LPMV(m_idSpl),NULL,"Source property list (key-value pairs)",FF_NOSET,6002,1,"data",NULL)
	REGISTER_FIELD("strs","",LPMV(m_bStrs),NULL,"Get character strings in double quotation marks as tokens.",0,2002,1,"short",(INT16)TRUE)
	REGISTER_FIELD("tsq","",LPMV(m_idTsq),NULL,"Token sequence",FF_NOSET,6002,1,"data",NULL)
	REGISTER_FIELD("txt","",LPMV(m_idTxt),NULL,"Documentation texts",FF_NOSET,6002,1,"data",NULL)

	// Register errors
	REGISTER_ERROR("~e1_0_0__1",EL_ERROR,DG_TOOFEWCOMPS,"Node table of instance '%s' has too few components.")
	REGISTER_ERROR("~e2_0_0__1",EL_ERROR,DG_NOTSYMBCOMPTYPE,"Node component %ld of instance '%s' must be symbolic.")
	REGISTER_ERROR("~e3_0_0__1",EL_WARNING,DG_TOOLONG,"%s(%ld): %s too long.")
	REGISTER_ERROR("~e4_0_0__1",EL_WARNING,DG_TOOLONG2,"%s '%s' too long (max. %ld characters).")
	REGISTER_ERROR("~e5_0_0__1",EL_ERROR,DG_HERESCRIPT,"Unexpected end of file scanning for '%s'.")
	REGISTER_ERROR("~e6_0_0__1",EL_ERROR,DG_STREXCEEDSLINE,"String constant exceeds line.")
	REGISTER_ERROR("~e7_0_0__1",EL_ERROR,DG_PARSER,"Parser '%s' unknown.")
	REGISTER_ERROR("~e8_0_0__1",EL_ERROR,DG_OPCODE,"'%s' is not a valid %s operation.")
	REGISTER_ERROR("~e9_0_0__1",EL_ERROR,DG_SYNTAX,"Syntax error.")
	REGISTER_ERROR("~e0_1_0__1",EL_ERROR,DG_SYNTAX2,"Syntax error (%s).")
	REGISTER_ERROR("~e1_1_0__1",EL_ERROR,DG_EXPECT,"Expect %s.")
	REGISTER_ERROR("~e2_1_0__1",EL_ERROR,DG_AWOB,"%s without matching %s.")
	REGISTER_ERROR("~e3_1_0__1",EL_ERROR,DG_JVD,"JavaDoc %s %s %s.")
	//}}CGEN_REGISTERWORDS

	return O_K;
}