classdef program < handle
    properties
        % programname
        currentstep
        steps
    end
    
    methods
        function obj = program()
            obj.steps = [obj.steps fluidstep('stop', 10, 0, 'AV_NONE')];
            for i = 2:15
                obj.steps(i) = fluidstep('stop', 10, 0, 'AV_NONE');
            end
        end
        
        function addstep(obj, fluidstep, index)
            obj.steps(index) = fluidstep;
        end
        
        function fs = getstep(obj, index)
            if(index > 15 || index < 1)
                % TODO: Add error handling
                fs = fluidstep('stop', 10, 0, 'AV_NONE');
            else
                fs = obj.steps(index);
            end
        end
    end
    
    methods (Static)
        function obj = copy(program)
            obj = program();
            for i = 1:15
                obj.addstep(fluidstep.copy(program.getstep(i)), i);
            end
        end
    end
end