classdef (Hidden = true) SectionResult < coder.profile.SectionData
    % Class Definition for the results of a SectionData object
	
    % Copyright 2020-2021 The MathWorks, Inc.

    properties (GetAccess = private, SetAccess = private) 
        PrimaryCallSiteSID;
        CodeSectionName;
        IsTask;
        SampleTime;
        FileName;
        LineNumbers;
    end
    
    methods
        
        function lPrimaryCallSiteSID = getPrimaryCallSiteSID(this)
            lPrimaryCallSiteSID = this.PrimaryCallSiteSID;
        end
        
        function lCodeSectionName = getCodeSectionName(this)
            lCodeSectionName = this.CodeSectionName;
        end
        
        function lIsTask = isTask(this)
            lIsTask = this.IsTask;
        end
        
        function lSampleTime = getSampleTime(this)
            lSampleTime = this.SampleTime;
        end
                        
        function lFileName = getFileNames(this)
            lFileName = this.FileName;
        end
        
        function lLineNumbers = getLineNumbers(this)
            lLineNumbers = this.LineNumbers;
        end
                        
        function this = SectionResult(lExecutionTimeTaskSection)
            this@coder.profile.SectionData(lExecutionTimeTaskSection);
            traceInfo = lExecutionTimeTaskSection.getTraceInfo;
            Name = traceInfo.getName();
            this.setName(Name);
            this.PrimaryCallSiteSID = traceInfo.getPrimaryCallSiteSID();
            this.CodeSectionName = traceInfo.getCodeSectionName();
            this.IsTask = traceInfo.isTask;
            this.SampleTime = traceInfo.getSampleTime();
            this.FileName = traceInfo.getFileNames();
            this.LineNumbers = traceInfo.getLineNumbers();
        end
    end
end
