CHAR convert a param object into a string. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: CHAR convert a history object into a string. CALL: string = char(hist) M-FILE INFO: Get information about this methods by calling >> history.getInfo('char') Get information about a specified set-plist by calling: >> history.getInfo('char', 'set') VERSION: $Id: char.m,v 1.8 2008/09/04 15:29:30 ingo Exp $ HISTORY: 04-02-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % CHAR convert a param object into a string. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: CHAR convert a history object into a string. 0005 % 0006 % CALL: string = char(hist) 0007 % 0008 % M-FILE INFO: Get information about this methods by calling 0009 % >> history.getInfo('char') 0010 % 0011 % Get information about a specified set-plist by calling: 0012 % >> history.getInfo('char', 'set') 0013 % 0014 % VERSION: $Id: char.m,v 1.8 2008/09/04 15:29:30 ingo Exp $ 0015 % 0016 % HISTORY: 04-02-2007 M Hewitson 0017 % Creation 0018 % 0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 0021 function varargout = char(varargin) 0022 0023 %%% Check if this is a call for parameters 0024 if utils.helper.isinfocall(varargin{:}) 0025 varargout{1} = getInfo(varargin{3}); 0026 return 0027 end 0028 0029 objs = utils.helper.collect_objects(varargin(:), 'history'); 0030 0031 hstr = ''; 0032 0033 for ii = 1:numel(objs) 0034 hstr = [hstr, objs(ii).methodInfo.mname, ' + ']; 0035 end 0036 0037 hstr = hstr(1:end-2); 0038 0039 varargout{1} = hstr; 0040 end 0041 0042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0043 % Local Functions % 0044 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0045 0046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0047 % 0048 % FUNCTION: getInfo 0049 % 0050 % DESCRIPTION: Get Info Object 0051 % 0052 % HISTORY: 11-07-07 M Hewitson 0053 % Creation. 0054 % 0055 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0056 0057 function ii = getInfo(varargin) 0058 if nargin == 1 && strcmpi(varargin{1}, 'None') 0059 sets = {}; 0060 pl = []; 0061 else 0062 sets = {'Default'}; 0063 pl = getDefaultPlist; 0064 end 0065 % Build info object 0066 ii = minfo(mfilename, 'history', '', utils.const.categories.output, '$Id: char.m,v 1.8 2008/09/04 15:29:30 ingo Exp $', sets, pl); 0067 end 0068 0069 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0070 % 0071 % FUNCTION: getDefaultPlist 0072 % 0073 % DESCRIPTION: Get Default Plist 0074 % 0075 % HISTORY: 11-07-07 M Hewitson 0076 % Creation. 0077 % 0078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0079 0080 function plo = getDefaultPlist() 0081 plo = plist(); 0082 end 0083