classdef LinearizationIO < matlab.mixin.SetGet & matlab.mixin.Copyable
%modelpack.LinearizationIO class
%    modelpack.LinearizationIO properties:
%       Description - Property is of type 'ustring'  
%
%    modelpack.LinearizationIO methods:
%       isOpenLoop - Returns the open-loop status of the signal marked as a
%       setOpenLoop - Sets the open-loop status of the signal marked as a

% Copyright 2000-2023 The MathWorks, Inc.

properties (Access=protected, SetObservable)
    %VERSION Property is of type 'double' 
    Version = 0;
end

properties (SetObservable)
    %DESCRIPTION Property is of type 'ustring' 
    Description = '';
end


    methods 
        function set.Description(obj,value)
            % DataType = 'ustring'
        % no cell string checks yet'
        obj.Description = value;
        end

        function set.Version(obj,value)
            % DataType = 'double'
        validateattributes(value,{'numeric'}, {'scalar'},'','Version')
        value = double(value); %  convert to double
        obj.Version = value;
        end

    end   % set and get functions 

    methods  % public methods
       function flag = isOpenLoop(this)
       % ISOPENLOOP Returns the open-loop status of the signal marked as a
       % linearization I/O.
       %
       % FLAG is a logical value (cell array of logical values if THIS is
       % an object array).
       
       n = length( this(:) );
       
       if n == 1
         flag = false;
       else
         flag = cell(n,1);
         flag(:) = {false};
       end
       
       warning(message('Controllib:general:AbstractMethodMustBeOverloaded'));
       
       end  % isOpenLoop
       
       function setOpenLoop(~, ~)
       % SETOPENLOOP Sets the open-loop status of the signal marked as a
       % linearization I/O.
       %
       % FLAG is a logical value.
       
       warning(message('Controllib:general:AbstractMethodMustBeOverloaded'));
       
       end  % setOpenLoop
       
end  % public methods 

end  % classdef

% LocalWords:  ISOPENLOOP SETOPENLOOP
