diff m-toolbox/classes/+utils/@models/getInfo.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/+utils/@models/getInfo.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,16 @@
+% GETINFO Get Info Object
+% 
+% CALL: utils.models.getInfo(modelname, @getModelDescription, @versionTable, version, @getFileVersion)
+% 
+% 
+function ii = getInfo(varargin)
+  modelname = varargin{1};
+  getVersion = varargin{5};
+  pls = utils.models.getDefaultPlist(varargin{2:end});
+  % Build info object
+  parts = regexp(modelname, '_', 'split');
+  ii = minfo(modelname, parts{1}, 'ltpda', utils.const.categories.constructor, getVersion(), {}, pls);
+  ii.setDescription(utils.models.getDescription(varargin{2:end}));
+  fcn = utils.models.functionForVersion(varargin{2:end});
+  ii.addChildren(fcn('info'));
+end
\ No newline at end of file