Home > classes > @provenance > display.m

display

PURPOSE ^

DISPLAY overload terminal display for provenance objects.

SYNOPSIS ^

function txt = display(ps, varargin)

DESCRIPTION ^

 DISPLAY overload terminal display for provenance objects.

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

 DESCRIPTION: DISPLAY overload terminal display for provenance objects.

 VERSION: $Id: display.m,v 1.8 2008/01/08 16:39:11 ingo Exp $

 HISTORY: 07-05-2007 M Hewitson
             Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function txt = display(ps, varargin)
0002 % DISPLAY overload terminal display for provenance objects.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: DISPLAY overload terminal display for provenance objects.
0007 %
0008 % VERSION: $Id: display.m,v 1.8 2008/01/08 16:39:11 ingo Exp $
0009 %
0010 % HISTORY: 07-05-2007 M Hewitson
0011 %             Creation
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 
0015 VERSION  = '$Id: display.m,v 1.8 2008/01/08 16:39:11 ingo Exp $';
0016 
0017 % Check if this is a call for parameters
0018 if nargin == 2
0019   if isa(ps, 'provenance') && ischar(varargin{1})
0020     in = char(varargin{1});
0021     if strcmp(in, 'Params')
0022       txt = plist;
0023       return
0024     elseif strcmp(in, 'Version')
0025       txt = VERSION;
0026       return
0027     end
0028   end
0029 end
0030 
0031 txt = {};
0032 
0033 for i=1:numel(ps)
0034   p = ps(i);
0035   banner = sprintf('-------- provenance %02d ------------', i);
0036   txt{end+1} = banner;
0037 
0038   txt{end+1} = ' ';
0039 
0040   txt{end+1} = sprintf('     creator:  %s', get(p, 'creator'));
0041   txt{end+1} = sprintf('     created:  %s', char(get(p, 'created')));
0042   txt{end+1} = sprintf('          ip:  %s', get(p, 'ip'));
0043   txt{end+1} = sprintf('    hostname:  %s', get(p, 'hostname'));
0044   txt{end+1} = sprintf('          os:  %s', get(p, 'os'));
0045   txt{end+1} = sprintf('  MATLAB ver:  %s', get(p, 'matlab_version'));
0046   txt{end+1} = sprintf('Sig Proc ver:  %s', get(p, 'sigproc_version'));
0047   txt{end+1} = sprintf('   LTPDA ver:  %s', get(p, 'ltpda_version'));
0048 
0049   banner_end(1:length(banner)) = '-';
0050   txt{end+1} = banner_end;
0051 
0052   txt{end+1} = ' ';
0053   txt{end+1} = ' ';
0054 end
0055 
0056 if nargout == 0
0057   for ii=1:length(txt)
0058     disp(txt{ii});
0059   end
0060 end
0061 
0062 % END

Generated on Tue 22-Jan-2008 10:39:13 by m2html © 2003