Skip to content
Snippets Groups Projects
Commit 423efd72 authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Create a mechanism to upgrade the TET's data structures, and do some cleanup.

The TET now has a mechanism to upgrade TE blocks to the latest data structures,
though backwards compatibility is not currently dealt with.
Also clear unneeded cell arrays that held text.  I'm not sure why that existed,
 and at least the quadratic example has both cell and non-cell arrays for
holding the text, speaking to the uselessness of the array.  Thus remove the
array as an upgrade mechanism.  This shrinks down the size of the TE blocks
some too!
parent 2e39f03e
No related branches found
No related tags found
1 merge request!1Purge and sanitize table storage format
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - Cell object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
if iscell(object.cond_text)
object.cond_text = object.cond_text{1};
end
for i=1:size(object.subgrid,2)
object.subgrid(i).upgrade;
end
end
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - Data object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
object.Grid0.upgrade
object.Grid1.upgrade
object.Grid2.upgrade
end
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - Grid object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
for i=1:size(object.cells, 2)
object.cells(i).upgrade
end
end
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - RCell object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
if iscell(object.result_text)
object.result_text = object.result_text{1};
end
end
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - RGrid object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
for i = 1:size(object.Cells, 2)
object.Cells(i).upgrade;
end
end
......@@ -123,6 +123,8 @@ else
figure(data.fig);
return
end
else
data.upgrade
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment