comparison m-toolbox/classes/@minfo/char.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 % CHAR convert an minfo object into a string.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: CHAR convert an minfo object into a string.
5 %
6 % CALL: string = char(obj)
7 %
8 % VERSION: $Id: char.m,v 1.7 2011/02/18 16:48:53 ingo Exp $
9 %
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 function varargout = char(varargin)
13
14 objs = utils.helper.collect_objects(varargin(:), 'minfo');
15
16 pstr = '';
17 for ii = 1:numel(objs)
18
19 pp = objs(ii);
20 % method class
21 pstr = [pstr sprintf('%s/', pp.mclass)];
22 % method name
23 pstr = [pstr sprintf('%s', pp.mname)];
24 % method category
25 pstr = [pstr sprintf(', %s', pp.mcategory)];
26 % method sets
27 if ~isempty(pp.sets)
28 pstr = [pstr sprintf(', %s', utils.prog.cell2str(pp.sets))];
29 end
30 end
31
32 %%% Prepare output
33 varargout{1} = pstr;
34 end
35