Main Content

next

Class: systemcomposer.rptgen.finder.StereotypeFinder
Namespace: systemcomposer.rptgen.finder

Get next stereotype search result

Since R2022b

Syntax

result = next(finder)

Description

result = next(finder) gets the next Stereotype search result.

Input Arguments

expand all

Stereotype finder, specified as a systemcomposer.rptgen.finder.StereotypeFinder object.

Output Arguments

expand all

Stereotype result, returned as a systemcomposer.rptgen.finder.StereotypeResult object.

Examples

expand all

Use the StereotypeFinder and StereotypeResult classes to generate a report.

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

scExampleSmallUAV
model_name = "scExampleSmallUAVModel";
model = systemcomposer.loadModel(model_name);
rpt = slreportgen.report.Report(output="StereotypeFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Stereotypes in %s Model',model_name)));
add(rpt,TableOfContents);

stereotypeFinder = StereotypeFinder("UAVComponent");
chapter = Chapter("Title","Stereotypes");
while hasNext(stereotypeFinder)
    stereotype = next(stereotypeFinder);
    sect = Section("Title",stereotype.Name);
    add(sect,stereotype);
    add(chapter,sect);
end

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

Version History

Introduced in R2022b