classdef MATLABIdentifier < fxptds.AbstractIdentifier
    % MATLABIDENTIFIER class represents a MATLAB Identifier.
    
    % Copyright 2014-2020 The MathWorks, Inc.
    
    properties(Dependent = true, SetAccess = private)
        MasterInferenceReport
    end
    
    properties(Dependent = true, GetAccess = protected)
        MasterInferenceManager
    end
    
    properties(SetAccess = protected)
        ResultConstructor
    end
    
    methods(Abstract)
        newId = getIdWithNewSID(this, newSID);
    end
    
    methods
        function value = get.MasterInferenceReport(obj)
            value = obj.MasterInferenceManager.MasterInferenceReport;
        end
        
        function value = get.MasterInferenceManager(~)
            value = fxptds.MasterInferenceManager.getInstance;
        end
        
        function obj = MATLABIdentifier()
            obj.MasterInferenceManager.incrementIdCount;
        end
        
        function delete(obj)
            obj.MasterInferenceManager.decrementIdCount;
        end
    end
    
    
    methods (Static)
        function masterInference = setCurrentInferenceReport(inferenceReport, varargin)
            masterInferenceManager = fxptds.MasterInferenceManager.getInstance;
            masterInference = masterInferenceManager.setCurrentInferenceReport(...
                inferenceReport, varargin{:});
        end
        
        function holdMasterInferenceReport()
            masterInferenceManager = fxptds.MasterInferenceManager.getInstance;
            masterInferenceManager.holdMasterInferenceReport;
        end
        
        function releaseMasterInferenceReport()
            masterInferenceManager = fxptds.MasterInferenceManager.getInstance;
            masterInferenceManager.releaseMasterInferenceReport;
        end
        
        function obj = loadobj(obj)
            masterInferenceManager = fxptds.MasterInferenceManager.getInstance;
            masterInferenceManager.incrementIdCount;
        end
    end % methods (Static)
    
end

