view m-toolbox/classes/@history/display.m @ 5:5a49956df427 database-connection-manager

LTPDAPreferences panel for new LTPDADatabaseConnectionManager
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% DISPLAY implement terminal display for history object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: DISPLAY implement terminal display for history object.
%
% CALL:        txt = display(history)
%
% INPUT:       history - history object
%
% OUTPUT:      txt     - cell array with strings to display the history object
%
% VERSION:     $Id: display.m,v 1.19 2011/02/18 16:48:52 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = display(varargin)

  hists  = [varargin{:}];

  txt = utils.helper.objdisp(hists);

  if nargout == 0
    for ii=1:length(txt)
      disp(txt{ii});
    end
  end

  varargout{1} = txt;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                               Local Functions                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function new_txt = single_cell(txt_field)

  new_txt = {};
  for ii=1:length(txt_field)
    if iscell(txt_field{ii})
      hh = single_cell(txt_field{ii});
      new_txt(end+1:end+length(hh)) = hh(1:end);
    else
      new_txt{end+1} = txt_field{ii};
    end
  end
end