ADDHISTORY Add a history-object to the ltpda_uo object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Add a history-object to the ltpda_uoh object. CALL: obj = addHistory(obj, minfo, h_pl, var_name, inhists, ...); M-FILE INFO: Get information about this methods by calling >> ao.getInfo('addHistory') Get information about a specified set-plist by calling: >> ao.getInfo('addHistory', 'None') VERSION: $Id: addHistory.m,v 1.7 2008/09/04 15:29:30 ingo Exp $ HISTORY: 27-05-2008 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % ADDHISTORY Add a history-object to the ltpda_uo object. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: Add a history-object to the ltpda_uoh object. 0005 % 0006 % CALL: obj = addHistory(obj, minfo, h_pl, var_name, inhists, ...); 0007 % 0008 % M-FILE INFO: Get information about this methods by calling 0009 % >> ao.getInfo('addHistory') 0010 % 0011 % Get information about a specified set-plist by calling: 0012 % >> ao.getInfo('addHistory', 'None') 0013 % 0014 % VERSION: $Id: addHistory.m,v 1.7 2008/09/04 15:29:30 ingo Exp $ 0015 % 0016 % HISTORY: 27-05-2008 Diepholz 0017 % Creation 0018 % 0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 0021 function varargout = addHistory(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 % The object to add history to 0030 obj = varargin{1}; 0031 0032 %%% Decide on a deep copy or a modify 0033 obj = copy(obj, nargout); 0034 0035 %%% Add history to all objects 0036 for ii = 1:numel(obj) 0037 obj(ii).setHist(history(time().utc_epoch_milli, varargin{2}, varargin{3}, varargin{4}, varargin{5:end})); 0038 end 0039 0040 %%% Prepare output 0041 varargout{1} = obj; 0042 end 0043 0044 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0045 % Local Functions % 0046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0047 0048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0049 % 0050 % FUNCTION: getInfo 0051 % 0052 % DESCRIPTION: Get Info Object 0053 % 0054 % HISTORY: 11-07-07 M Hewitson 0055 % Creation. 0056 % 0057 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0058 0059 function ii = getInfo(varargin) 0060 if nargin == 1 && strcmpi(varargin{1}, 'None') 0061 sets = {}; 0062 pl = []; 0063 else 0064 sets = {'Default'}; 0065 pl = getDefaultPlist; 0066 end 0067 % Build info object 0068 ii = minfo(mfilename, 'ltpda_uoh', '', utils.const.categories.internal, '$Id: addHistory.m,v 1.7 2008/09/04 15:29:30 ingo Exp $', sets, pl); 0069 end 0070 0071 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0072 % 0073 % FUNCTION: getDefaultPlist 0074 % 0075 % DESCRIPTION: Get Default Plist 0076 % 0077 % HISTORY: 11-07-07 M Hewitson 0078 % Creation. 0079 % 0080 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0081 0082 function plo = getDefaultPlist() 0083 plo = plist(); 0084 end 0085