classdef responseCurves < types.core.LabMetaData & types.untyped.GroupClass
% RESPONSECURVES A group of response curves


% PROPERTIES
properties
    responsecurve; % ResponseCurve attributes
end

methods
    function obj = responseCurves(varargin)
        % RESPONSECURVES Constructor for responseCurves
        %     obj = RESPONSECURVES(parentname1,parentvalue1,..,parentvalueN,parentargN,name1,value1,...,nameN,valueN)
        % responsecurve = responseCurve
        obj = obj@types.core.LabMetaData(varargin{:});
        [obj.responsecurve, ivarargin] = types.util.parseConstrained(obj,'responsecurve', 'types.ndx_cell_explorer.responseCurve', varargin{:});
        varargin(ivarargin) = [];
        
        p = inputParser;
        p.KeepUnmatched = true;
        p.PartialMatching = false;
        p.StructExpand = false;
        misc.parseSkipInvalidName(p, varargin);
        if strcmp(class(obj), 'types.ndx_cell_explorer.responseCurves')
            types.util.checkUnset(obj, unique(varargin(1:2:end)));
        end
    end
    %% SETTERS
    function obj = set.responsecurve(obj, val)
        obj.responsecurve = obj.validate_responsecurve(val);
    end
    %% VALIDATORS
    
    function val = validate_responsecurve(obj, val)
        constrained = {'types.ndx_cell_explorer.responseCurve'};
        types.util.checkSet('responsecurve', struct(), constrained, val);
    end
    %% EXPORT
    function refs = export(obj, fid, fullpath, refs)
        refs = export@types.core.LabMetaData(obj, fid, fullpath, refs);
        if any(strcmp(refs, fullpath))
            return;
        end
        if ~isempty(obj.responsecurve)
            refs = obj.responsecurve.export(fid, fullpath, refs);
        end
    end
end

end