Home > classes > @pzmodel > char.m

char

PURPOSE ^

CHAR convert a pzmodel object into a string.

SYNOPSIS ^

function varargout = char(varargin)

DESCRIPTION ^

 CHAR convert a pzmodel object into a string.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: CHAR convert a pzmodel object into a string.

 CALL:        string = char(pzmodel)

 M-FILE INFO: Get information about this methods by calling
              >> pzmodel.getInfo('char')

              Get information about a specified set-plist by calling:
              >> pzmodel.getInfo('char', 'set')

 VERSION:     $Id: char.m,v 1.8 2008/09/04 15:29:31 ingo Exp $

 HISTORY:     02-04-2007 M Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % CHAR convert a pzmodel object into a string.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: CHAR convert a pzmodel object into a string.
0005 %
0006 % CALL:        string = char(pzmodel)
0007 %
0008 % M-FILE INFO: Get information about this methods by calling
0009 %              >> pzmodel.getInfo('char')
0010 %
0011 %              Get information about a specified set-plist by calling:
0012 %              >> pzmodel.getInfo('char', 'set')
0013 %
0014 % VERSION:     $Id: char.m,v 1.8 2008/09/04 15:29:31 ingo Exp $
0015 %
0016 % HISTORY:     02-04-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(:), 'pzmodel');
0030 
0031   pstr = '';
0032   
0033   for ii = 1:numel(objs)
0034     pstr = [pstr 'pzmodel(' objs(ii).name '), '];
0035   end
0036 
0037   varargout{1} = strrep(pstr(1:end-2), '_', '\_');
0038 end
0039 
0040 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0041 %                               Local Functions                               %
0042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0043 
0044 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0045 %
0046 % FUNCTION:    getInfo
0047 %
0048 % DESCRIPTION: Get Info Object
0049 %
0050 % HISTORY:     11-07-07 M Hewitson
0051 %                Creation.
0052 %
0053 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0054 
0055 function ii = getInfo(varargin)
0056   if nargin == 1 && strcmpi(varargin{1}, 'None')
0057     sets = {};
0058     pl   = [];
0059   else
0060     sets = {'Default'};
0061     pl   = getDefaultPlist;
0062   end
0063   % Build info object
0064   ii = minfo(mfilename, 'pzmodel', '', utils.const.categories.output, '$Id: char.m,v 1.8 2008/09/04 15:29:31 ingo Exp $', sets, pl);
0065 end
0066 
0067 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0068 %
0069 % FUNCTION:    getDefaultPlist
0070 %
0071 % DESCRIPTION: Get Default Plist
0072 %
0073 % HISTORY:     11-07-07 M Hewitson
0074 %                Creation.
0075 %
0076 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0077 
0078 function plo = getDefaultPlist()
0079   plo = plist();
0080 end
0081

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003