Main Content

hasNext

Class: systemcomposer.rptgen.finder.ViewFinder
Package: systemcomposer.rptgen.finder

Find if view search result queue is nonempty

Syntax

nonempty = hasNext(finder)

Description

nonempty = hasNext(finder) determines whether the View search result queue is nonempty.

Input Arguments

expand all

View finder, specified as a systemcomposer.rptgen.finder.ViewFinder object.

Output Arguments

expand all

Whether queue is nonempty, returned as a logical.

Data Types: logical

Examples

expand all

Use the ViewFinder and ViewResult classes to generate a report.

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

scKeylessEntrySystem
model_name = "KeylessEntryArchitecture";
model = systemcomposer.loadModel(model_name);
rpt = slreportgen.report.Report(output="ViewFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Views in %s Model',model_name)));
add(rpt,TableOfContents);

viewFinder = ViewFinder(model_name);

chapter = Chapter("Title","Views");
while hasNext(viewFinder)
    view = next(viewFinder);
    sect = Section("Title",view.Name);
    add(sect,view);
    add(chapter,sect);
end

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

Version History

Introduced in R2022b