% Author: Matthew Dawson matthew@mjdsystems.ca
% Organization: McMaster Centre for Software Certification
classdef TableGrid < handle
    % This class will store the data for each table, ideally to seperate
    % out the data from the gui and logic.
    
    properties
        grid = TableGridCell
        width = 0
        height = 0
    end
    
    events
        AddedColumn
        AddedRow
        StructureChanged
    end
    
    methods
        
        %% Data
        %   constructor
        % inputs:
        %   none
        % outputs:
        %   object:Data - created object
        function object = TableGrid()
            % object.grid = TableGridCell;
            object.grid(:,1) = [];
        end
        
        function cell = get_cell(object, y, x)
            assert( x > 0 && x <= object.width, 'Provide a valid X cordinate!');
            assert( y > 0 && y <= object.height, 'Provide a valid Y cordinate!');
            
            cell = object.grid(y, x);
        end
        
    end
    
    
end
