classdef StackSection < handle & matlab.mixin.Heterogeneous
%STACKSECTION execution profiling results for a section of code
    
%   Copyright 2021-2022 The MathWorks, Inc.
    
    properties (Access=protected)
        TraceInfo;
        SectionId;
    end
    
    properties (GetAccess=public, SetAccess=private)
        Name;
        Number;
        NumCalls;
    end        
    
    properties (Access=private)
        IdUint64;
    end        
    
    methods
        function name = get.Name(this)
            name = this.getName;
        end
    end
    
    methods (Abstract, Access = public, Hidden=true)
        getName(this);
    end
    
    methods (Hidden=true, Access=public)
        function this = StackSection(lSectionNumber, lSectionId, lTraceInfo, lIdUint64, numCalls)
            this.Number = lSectionNumber;
            this.SectionId = lSectionId;
            this.TraceInfo = lTraceInfo;
            this.IdUint64 = lIdUint64;
            this.NumCalls = numCalls;
        end

        function  lTraceInfo = getTraceInfo(this)
            lTraceInfo = this.TraceInfo;
        end
        
        function res = getIdUint64(this)
            res = this.IdUint64;
        end
    end
end
