classdef (Abstract) SlFunctionInfoBase < handle
    % SLFUNCTIONINFOBASE
    %
    % Base class defining interface of container object with information
    % about a Simulink Function needed for SIL/PIL.

    % Copyright 2018-2021 The MathWorks, Inc.

    properties (GetAccess = public, SetAccess = protected)
        % Function visibility
        SlFunctionVisibility (1,1) rtw.pil.SimulinkFunctionVisibility;
        
        % Function Name - this is the "Graphical" name.
        %
        % We don't want to use the scoped CGFunctionName because MF0 has
        % the "Simulink Compile" version rather then the Code Generation
        % version.
        SlFunctionName
        
        % Scope name of the function, which is empty for global functions
        ScopeName
        
        % Full path to Simulink Function - this combined with the
        % SlFunctionName gives a unique identifier that is consistent
        % between code generation and Simulink compile.
        FullPathToSimulinkFunction
        
        % Ref Block Paths (if called)
        RefBlockPaths
        
        % CalledInModels (list of sub-models containing callers)
        CalledInModels
        
        % Is Called
        IsCalled
        
        % Is Defined
        IsDefined
        
        % Associated port index
        CompPortIndex

        % Is only called in child model
        IsOnlyCalledInChildModel
        
        % Child callers
        ChildCallers
    end
    
    properties (Dependent, SetAccess = private, GetAccess = public)
        % Key to use for containers.Map object
        UniqueKey
    end
    
    methods
        function ret = get.UniqueKey(this)
            ret = rtw.pil.CSFunctionInfoFactory.getKeyFromFullPathAndFunctionName(this.FullPathToSimulinkFunction, this.SlFunctionName);
        end
    end
end
