classdef SlDemoRangeCheck < int8
% SLDEMORANGECHECK  Enumeration class for sldemo_mdlref_datamngt.slx
%
%   Allowable values:
%   - SlDemoRangeCheck.UpperLimit (for values at/above upper limit)
%   - SlDemoRangeCheck.InRange
%   - SlDemoRangeCheck.LowerLimit (for values at/below lower limit)
%
%   NOTE:
%   -----
%   This enumeration class is derived from int8, so this type
%   will be defined as an alias to int8_T in the generated code.

%   Copyright 2009-2014 The MathWorks, Inc.

  % Define enumeration members and underlying numeric value
  enumeration
    UpperLimit(1)
    InRange(0)
    LowerLimit(-1)
  end

  % Optional methods to customize class attributes
  methods (Static)
    function retVal = getDescription()
      % GETDESCRIPTION Specifies a string to describe this enumerated type.

      retVal = 'Enumerated type to indicate if values are in range or not.';
    end
    
    function retVal = getDefaultValue()
      % GETDEFAULTVALUE Specifies the default enumeration member.
      % Return a valid member of this enumeration class to specify the default.
      % If you do not define this method, Simulink uses the first member.
      retVal = SlDemoRangeCheck.InRange;
    end
    
    function retVal = getDataScope()
      % GETDATASCOPE Specifies whether generated code imports or exports this type.
      % Return one of these strings:
      % 'Auto':     define type in model_types.h, or import if header file specified
      % 'Exported': define type in a generated header file
      % 'Imported': import type definition from specified header file
      % If you do not define this method, DataScope is 'Auto' by default.
      retVal = 'Exported';
    end

    function retVal = getHeaderFile()
      % GETHEADERFILE Specifies the file that defines this type in generated code.
      % The method getDataScope determines the significance of the specified file.
      retVal = 'EnumTypes.h';
    end
    
    function retVal = addClassNameToEnumNames()
      % ADDCLASSNAMETOENUMNAMES Specifies whether to add the class name
      % as a prefix to enumeration member names in generated code.
      % Return true or false.
      % If you do not define this method, no prefix is added.
      retVal = true;
    end
  end
end
