Mercurial > hg > ltpda
diff m-toolbox/classes/@LTPDAworkbench/minfo2algo.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@LTPDAworkbench/minfo2algo.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,32 @@ +% MINFO2ALGO converts an minfo object to an LTPDAalgorithm suitable to pass +% to a mpipeline object. +% +function a = minfo2algo(ii) + + a = mpipeline.jltpda.LTPDAalgorithm; + a.setMname(ii.mname); + a.setMcategory(ii.mcategory); + a.setMclass(ii.mclass); + a.setMinInputs(ii.argsmin); + a.setMaxInputs(ii.argsmax); + a.setMinOutputs(ii.outmin); + a.setMaxOutputs(ii.outmax); + if strcmp(ii.mclass, ii.mname) + process = helpUtils.helpProcess(1, 1, {ii.mclass}); + process.getHelpText; + a.setHelpTxt(process.helpStr); + else + process = helpUtils.helpProcess(1, 1, {[ii.mclass '.' ii.mname]}); + process.getHelpText; + a.setHelpTxt(process.helpStr); + end + % get default plist for this method + for pp = 1:numel(ii.sets) + set = ii.sets{pp}; + mpl = ii.plists(pp); + % build java plist + jpl = LTPDAworkbench.mpl2jpl(mpl); + a.addSetPlist(set,jpl); + end + +end