comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % PARSEMETHODINFO parses the standard function information.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: PARSEMETHODINFO parses the standard function information.
5 %
6 % out = utils.helper.parseMethodInfo(info, plist, version, category)
7 %
8 % The following call returns a parameter list object that contains the
9 % default parameter values:
10 %
11 % >> pl = utils.helper.parseMethodInfo('Params')
12 %
13 % The following call returns a string that contains the routine CVS version:
14 %
15 % >> version = utils.helper.parseMethodInfo('Version')
16 %
17 % The following call returns a string that contains the routine category:
18 %
19 % >> category = utils.helper.parseMethodInfo('Category')
20 %
21 % HISTORY: 26-05-08 M Hewitson
22 % Creation
23 %
24 % VERSION: $Id: parseMethodInfo.m,v 1.4 2008/07/03 18:20:25 ingo Exp $
25 %
26 %
27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
28
29 function out = parseMethodInfo(varargin)
30
31 VERSION = '$Id: parseMethodInfo.m,v 1.4 2008/07/03 18:20:25 ingo Exp $';
32 CATEGORY = 'Utility';
33
34 if nargin == 1
35 % Then return my own values
36 out = [];
37 switch varargin{1}
38 case 'Params'
39 out = plist();
40 case 'Version'
41 out = VERSION;
42 case 'Category'
43 out = CATEGORY;
44 end
45 else
46 % Deal with someone else's values
47 out = [];
48 switch varargin{1}
49 case 'Params'
50 out = varargin{2};
51 case 'Version'
52 out = varargin{3};
53 case 'Category'
54 out = varargin{4};
55 end
56 end