Mercurial > hg > ltpda
diff m-toolbox/classes/+utils/@helper/parseMethodInfo.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/@helper/parseMethodInfo.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,56 @@ +% PARSEMETHODINFO parses the standard function information. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% DESCRIPTION: PARSEMETHODINFO parses the standard function information. +% +% out = utils.helper.parseMethodInfo(info, plist, version, category) +% +% The following call returns a parameter list object that contains the +% default parameter values: +% +% >> pl = utils.helper.parseMethodInfo('Params') +% +% The following call returns a string that contains the routine CVS version: +% +% >> version = utils.helper.parseMethodInfo('Version') +% +% The following call returns a string that contains the routine category: +% +% >> category = utils.helper.parseMethodInfo('Category') +% +% HISTORY: 26-05-08 M Hewitson +% Creation +% +% VERSION: $Id: parseMethodInfo.m,v 1.4 2008/07/03 18:20:25 ingo Exp $ +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +function out = parseMethodInfo(varargin) + +VERSION = '$Id: parseMethodInfo.m,v 1.4 2008/07/03 18:20:25 ingo Exp $'; +CATEGORY = 'Utility'; + +if nargin == 1 + % Then return my own values + out = []; + switch varargin{1} + case 'Params' + out = plist(); + case 'Version' + out = VERSION; + case 'Category' + out = CATEGORY; + end +else + % Deal with someone else's values + out = []; + switch varargin{1} + case 'Params' + out = varargin{2}; + case 'Version' + out = varargin{3}; + case 'Category' + out = varargin{4}; + end +end \ No newline at end of file