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.html,v 1.14 2008/03/31 10:27:45 hewitson 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.html,v 1.14 2008/03/31 10:27:45 hewitson Exp $
0009 %
0010 % HISTORY: 07-05-2007 M Hewitson
0011 %             Creation
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 
0015 VERSION  = '$Id: display.html,v 1.14 2008/03/31 10:27:45 hewitson Exp $';
0016 CATEGORY = 'Output';
0017 
0018 % Check if this is a call for parameters
0019 if nargin == 2
0020   if isa(ps, 'provenance') && ischar(varargin{1})
0021     in = char(varargin{1});
0022     if strcmp(in, 'Params')
0023       txt = plist;
0024       return
0025     elseif strcmp(in, 'Version')
0026       txt = VERSION;
0027       return
0028     elseif strcmp(in, 'Category')
0029       txt = CATEGORY;
0030       return
0031     end
0032   end
0033 end
0034 
0035 txt = {};
0036 
0037 for i=1:numel(ps)
0038   p = ps(i);
0039   banner = sprintf('-------- provenance %02d ------------', i);
0040   txt{end+1} = banner;
0041 
0042   txt{end+1} = ' ';
0043 
0044   txt{end+1} = sprintf('     creator:  %s', get(p, 'creator'));
0045   txt{end+1} = sprintf('     created:  %s', char(get(p, 'created')));
0046   txt{end+1} = sprintf('          ip:  %s', get(p, 'ip'));
0047   txt{end+1} = sprintf('    hostname:  %s', get(p, 'hostname'));
0048   txt{end+1} = sprintf('          os:  %s', get(p, 'os'));
0049   txt{end+1} = sprintf('  MATLAB ver:  %s', get(p, 'matlab_version'));
0050   txt{end+1} = sprintf('Sig Proc ver:  %s', get(p, 'sigproc_version'));
0051   txt{end+1} = sprintf('   LTPDA ver:  %s', get(p, 'ltpda_version'));
0052 
0053   banner_end(1:length(banner)) = '-';
0054   txt{end+1} = banner_end;
0055 
0056   txt{end+1} = ' ';
0057   txt{end+1} = ' ';
0058 end
0059 
0060 if nargout == 0
0061   for ii=1:length(txt)
0062     disp(txt{ii});
0063   end
0064 end
0065 
0066 % END

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003