classdef SubSystemExtractBatch < Sldv.SubSystemExtract
   
    properties
    end
    
    methods
        function obj = SubSystemExtractBatch(utilityName)
            obj = obj@Sldv.SubSystemExtract(utilityName);
        end
        
        function initPreCompile(obj,origH)
            obj.OrigModelH = origH;
            obj.IsModelSlicer = false;
            obj.storeOriginalModelParams;
            obj.configureAutoSaveState;
            obj.changeModelParams;
        end
        
        function restorePostCompile(obj)
            obj.restoreAutoSaveState;
            obj.restoreOriginalModelParams;
            obj.PhaseId = 0;
        end
        
        function flag = getAtomicWithParam(obj)
            flag = obj.AtomicSubChartWithParam;
        end
  
    end
    
    methods(Static)
        function setTestComp(ModelH,SubSystemH,AtomicSubChartWithParam)
            
            testcomp = Sldv.Token.get.getTestComponent;
            if isempty(testcomp)
                return;
            end
            
            testcomp.analysisInfo.analyzedModelH = ModelH;
            testcomp.analysisInfo.extractedModelH = ModelH;
            testcomp.analysisInfo.analyzedSubsystemH = SubSystemH;
            testcomp.analysisInfo.analyzedAtomicSubchartWithParam = AtomicSubChartWithParam;
            testcomp.analysisInfo.mappedSfId = ...
                containers.Map('KeyType', 'double', 'ValueType', 'double');
            testcomp.analysisInfo.mappedBlockH = ...
                containers.Map('KeyType', 'double', 'ValueType', 'double');
            
        end
    end
    
    methods (Access = protected)
        invokess2mdl(obj);     
    end
    
end

