Home > classes > @unit > display.m

display

PURPOSE ^

DISPLAY display an unit object.

SYNOPSIS ^

function varargout = display(varargin)

DESCRIPTION ^

 DISPLAY display an unit object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: DISPLAY display an unit object.

 CALL FOR PARAMETERS:

              obj.display('INFO') % Retrieve method information

 VERSION:     $Id: display.m,v 1.1 2008/09/05 14:10:15 hewitson Exp $

 HISTORY:     30-01-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % DISPLAY display an unit object.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: DISPLAY display an unit object.
0005 %
0006 % CALL FOR PARAMETERS:
0007 %
0008 %              obj.display('INFO') % Retrieve method information
0009 %
0010 % VERSION:     $Id: display.m,v 1.1 2008/09/05 14:10:15 hewitson Exp $
0011 %
0012 % HISTORY:     30-01-2007 M Hewitson
0013 %                 Creation
0014 %
0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0016 
0017 function varargout = display(varargin)
0018 
0019   %%% Check if this is a call for parameters
0020   if utils.helper.isinfocall(varargin{:})
0021     varargout{1} = getInfo(varargin{3});
0022     return
0023   end
0024 
0025   % Get unit objects
0026   objs = utils.helper.collect_objects(varargin(:), 'unit');
0027 
0028   % get display text
0029   txt = utils.helper.objdisp(objs);
0030 
0031   % display the objects
0032   if nargout > 0
0033     varargout{1} = txt;
0034   elseif nargout == 0;
0035     for j=1:numel(txt)
0036       disp(txt{j});
0037     end
0038   end
0039 end
0040 
0041 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0042 %                               Local Functions                               %
0043 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0044 
0045 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0046 %
0047 % FUNCTION:    getInfo
0048 %
0049 % DESCRIPTION: Get Info Object
0050 %
0051 % HISTORY:     11-07-07 M Hewitson
0052 %                Creation.
0053 %
0054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0055 
0056 function ii = getInfo(varargin)
0057   if nargin == 1 && strcmpi(varargin{1}, 'None')
0058     sets = {};
0059     pl   = [];
0060   else
0061     sets = {'Default'};
0062     pl   = getDefaultPlist;
0063   end
0064   % Build info object
0065   ii = minfo(mfilename, 'unit', '', utils.const.categories.output, '$Id: display.m,v 1.1 2008/09/05 14:10:15 hewitson Exp $', sets, pl);
0066 end
0067 
0068 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0069 %
0070 % FUNCTION:    getDefaultPlist
0071 %
0072 % DESCRIPTION: Get Default Plist
0073 %
0074 % HISTORY:     11-07-07 M Hewitson
0075 %                Creation.
0076 %
0077 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0078 
0079 function plo = getDefaultPlist()
0080   plo = plist();
0081 end
0082

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