classdef (Hidden = true) XRelBlockInterfaceArtifacts < coder.connectivity.ComponentInterfaceArtifacts
%XRELBLOCKINTERFACEARTIFACTS Implements ComponentInterfaceArtifacts for 
% cross release XILBlock build that use the "_resources" dir
%
%   This is an undocumented class. Its methods and properties are likely to
%   change without warning from one release to the next.
    
%   Copyright 2020 The MathWorks, Inc.
       
    methods (Access = protected)
        function initalizeInternalArtifactsLocation(this)
            % When using the cross release resources workflow the code is 
            % imported with an LCT block into a temporary model from which
            % we create a SIL/PIL block.
            % To make this block relocatable, its artifacts are packed into
            % a _resources folder.
            % Load binfo from the relocatable _resources folder

            expression = ...
                ['\w+(?=' rtw.pil.SILPILBlock.getResourcesFolderSuffix '$)'];
            % (?=_resources$) looks ahead for characters that match
            % _resources, starting from the end of the input text
            this.CodeName = regexp(this.CodeDir, expression, 'match', 'once');
            this.BinfoFullFileName = fullfile(this.CodeDir, this.BinfoTop);
            % internal artifacts are located in CodeDir
            this.TMWInternalArtifactsPath = this.CodeDir;
        end
    end
end
