% Author: Matthew Dawson matthew@mjdsystems.ca
% Organization: McMaster Centre for Software Certification
classdef Data < handle
    % This class will store the data for each table, ideally to seperate
    % out the data from the gui and logic.
    
    properties
        left_cond = [];
        top_cond = [];
        outputs_grid = [];
        let_statements = [];
        function_name = [];
        function_inputs = [];
        settings = [];
        checked = [];
        open = [];
        fig = [];
        multi_mode = [];
    end
    
    
    
    methods
        
        %% Data
        %   constructor
        % inputs:
        %   none
        % outputs:
        %   object:Data - created object
        function object = Data()    
            object.left_cond = HierarchicalGrid();
            object.top_cond = HierarchicalGrid();
            object.outputs_grid = TableGrid();
            
            object.let_statements = LetStatments();
        
            object.left_cond.addlistener('AddedOuterCell', @(src, event) left_grid_added_cell(object, src, event));
            object.left_cond.addlistener('RemovedOuterCell', @(src, event) object.outputs_grid.delete_row(event.changed_cell));
            object.top_cond.addlistener('AddedOuterCell', @(src, event) top_grid_added_cell(object, src, event));
            object.top_cond.addlistener('RemovedOuterCell', @(src, event) object.outputs_grid.delete_column(event.changed_cell));
        end
        
    end
    
    
end
