主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

hasNext

类: systemcomposer.rptgen.finder.AllocationSetFinder
命名空间: systemcomposer.rptgen.finder

确定分配集搜索结果队列是否非空

自 R2022b 起

语法

nonempty = hasNext(finder)

说明

nonempty = hasNext(finder) 决定 AllocationSet 搜索结果队列是否为空。

输入参数

全部展开

分配集查找器,指定为 systemcomposer.rptgen.finder.AllocationSetFinder 对象。

输出参量

全部展开

队列是否为非空,以 1 (true) 或 0 (false) 返回。

数据类型: logical

示例

全部展开

使用 AllocationSetFinderAllocationSetResult 类生成报告。

import mlreportgen.report.*
import slreportgen.report.*
import systemcomposer.rptgen.finder.*

rpt = slreportgen.report.Report(output="AllocationSetFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Allocation Sets"));
add(rpt,TableOfContents);

allocationSetFinder = AllocationSetFinder("AllocationSet.mldatx");
chapter = Chapter("Title","Allocation Set");

while hasNext(allocationSetFinder)
    allocationSets = next(allocationSetFinder);
    sect = Section(strcat("Allocations in ",allocationSets.Name));
    add(sect,allocationSets);
    add(chapter,sect);
end

add(rpt,chapter);
close(rpt);
rptview(rpt);

版本历史记录

在 R2022b 中推出