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
Loading
Loading
Loading
Loading

@Cell/upgrade.m

0 → 100644
+18 −0
Original line number Diff line number Diff line
%% 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

@Data/upgrade.m

0 → 100644
+15 −0
Original line number Diff line number Diff line
%% 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

@Grid/upgrade.m

0 → 100644
+16 −0
Original line number Diff line number Diff line
%% 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

@RCell/upgrade.m

0 → 100644
+14 −0
Original line number Diff line number Diff line
%% 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

@RGrid/upgrade.m

0 → 100644
+14 −0
Original line number Diff line number Diff line
%% 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
Loading