classdef CSCTypeAttributes_SetParam < Simulink.CustomStorageClassAttributes
%Simulink.CSCTypeAttributes_SetParam  Class definition.

%   Copyright 2011-2014 The MathWorks, Inc.

  properties(PropertyType = 'char')
    GetFunction = 'get_$N';
  end
  
  properties(PropertyType = 'logical scalar')
    IsGetFunctionInstanceSpecific = true;
  end
  
  properties(PropertyType = 'char')
    SetFunction = 'set_$N';
  end
  
  properties(PropertyType = 'logical scalar')
    IsSetFunctionInstanceSpecific = true;
  end
   
  properties(Hidden, PropertyType = 'char')
    GetElementFunction = 'get_el_$N';
    SetElementFunction = 'set_el_$N';
  end
  
  properties(Hidden, PropertyType = 'logical scalar')
    % Indicate if Get/SetFunctions support array access (passed as RHS argument).
    % If not, we assume that Get/SetFunctions support element-wise access
    % and we do not expose separate properties for Get/SetElement functions.
    SupportsArrayAccess = false;
  end
   
  methods
    %---------------------------------------------------------------------------
    function obj = CSCTypeAttributes_SetParam()
      mlock; % Prevent class from being cleared and warnings from clear classes.
    end
    
    %---------------------------------------------------------------------------
%     function retVal = getIdentifiersForInstance(hCSCAttrib, hCSCDefn, hData, identifier) %#ok
%     %GETIDENTIFIERSFORINSTANCE  Get list of identifiers for this data object.
%         
%       % Check the validity of the Get/SetFunction names
%       retVal.GetFunction = strrep(getGetFunctionName(hCSCDefn, hData), '$N', identifier);
%       retVal.SetFunction = strrep(getSetFunctionName(hCSCDefn, hData), '$N', identifier);
%       
%       if (supportsArrayAccess(hCSCDefn, hData))
%         retVal.GetElementFunction = strrep(getGetElementFunctionName(hCSCDefn, hData), '$N', identifier);
%         retVal.SetElementFunction = strrep(getSetElementFunctionName(hCSCDefn, hData), '$N', identifier);
%       end
%     end
    
    %---------------------------------------------------------------------------
    function retVal = isAddressable(hObj, hCSCDefn, hData) %#ok
    %ISADDRESSABLE  Gives class control over data addressability.
    %  This information is used in conjunction with other factors to
    %  determine if data is addressable in the generated code.
      retVal = false;
    end
    
    %---------------------------------------------------------------------------
    function props = getInstanceSpecificProps(hObj)
    % GETINSTANCESPECIFICPROPERTIES  Return instance-specific properties
    %   (custom attributes that can be modified on each data object).
       props = [];
       if (hObj.IsGetFunctionInstanceSpecific)
          props = [props; findprop(hObj, 'GetFunction')];
       end
       if (hObj.IsSetFunctionInstanceSpecific)
          props = [props; findprop(hObj, 'SetFunction')];
       end
    end
    
  end % methods
end % classdef
