comparison m-toolbox/classes/@provenance/char.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % CHAR convert a provenance object into a string.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: CHAR convert a provenance object into a string.
5 %
6 % CALL: string = char(prov)
7 %
8 % VERSION: $Id: char.m,v 1.13 2011/02/18 16:48:54 ingo Exp $
9 %
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 function varargout = char(varargin)
13
14 objs = [varargin{:}];
15
16 pstr = '';
17 for ii = 1:numel(objs)
18 if ~isempty(pstr)
19 pstr = [pstr ' | '];
20 end
21
22 pstr = [pstr sprintf('created by %s@%s[%s] on %s/%s/%s', ...
23 objs(ii).creator,...
24 objs(ii).hostname,...
25 objs(ii).ip,...
26 objs(ii).os,...
27 objs(ii).matlab_version,...
28 objs(ii).ltpda_version)];
29 end
30
31 %%% Prepare output
32 varargout{1} = pstr;
33 end
34