diff m-toolbox/classes/@provenance/setFromEncodedInfo.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m-toolbox/classes/@provenance/setFromEncodedInfo.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,26 @@
+function p = setFromEncodedInfo(p, info)
+  
+  s = regexp(info, '#', 'split');
+  
+  % info{1} is empty
+  p.creator               = s{2};
+  p.ip                    = s{3};
+  p.hostname              = s{4};
+  p.os                    = s{5};
+  p.matlab_version        = s{6};
+  p.sigproc_version       = s{7};
+  p.symbolic_math_version = s{8};
+  p.optimization_version  = s{9};
+  p.database_version      = s{10};
+  p.control_version       = s{11};
+  p.ltpda_version         = s{12};
+  % s{13}: version dummy. We have to keep it for backwards compatibility.
+
+  % It is only possible to read the object if the object was saved with the
+  % same or lower LTPDA version as the current version.
+  v = ver('LTPDA');
+  if utils.helper.ver2num(v.Version) < utils.helper.ver2num(p.ltpda_version)
+    error('### The object was saved with a higher LTPDA version than you use %s. Please update your LTPDA version.', p.ltpda_version);
+  end
+  
+end