function [decData, decObjs] = getDecisionBlock(this, blockInfo,currDecCount)
% DECISION_BLOCK - Synthesize decision coverage data
% for a leaf model object.

% Copyright 1990-2014 The MathWorks, Inc.

    decisionData = this.metricData.decision;
    flags = [];

    
    metricEnum = cvi.MetricRegistry.getEnum('decision');    
    [decObjs,localIdx,localCnt, justifiedLocalIdx, varLocalCntIdx, hasLocalVariableSize] = cv('MetricGet',blockInfo.cvId,metricEnum,'.baseObjs', ...
                                        '.dataIdx.shallow','.dataCnt.shallow', ...
                                        '.justifiedDataIdx.shallow', ...
                                        '.dataCnt.varShallowIdx', '.hasLocalVariableSize');
    
    if isempty(decObjs)
        decData = [];
        return;
    end

    decData.decisionIdx = currDecCount + (1:length(decObjs));
    decData.inBlockIdx = 1:numel(decObjs);
    decData.outHitCnts = decisionData (localIdx+1,:);
    decData.justifiedOutHitCnts = decisionData (justifiedLocalIdx+1,:);
    if hasLocalVariableSize
        localCnt = decisionData (varLocalCntIdx + 1,end);
    end
    decData.totalCnts = localCnt;
    decData.executedIn = this.cvd{1}.getTrace('decision', localIdx + 1, true);
    decData.flags = cvi.ReportData.getDecisionBlockFlag(decData);
    



