Main Content

children

Class: slreq.ReqSet
Namespace: slreq

Get top-level items in requirement set

Syntax

reqs = children(rs)

Description

reqs = children(rs) returns the top-level items in the requirement set rs. The items can be requirements, referenced requirements, or justifications.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Output Arguments

expand all

Top-level items in the requirement set, returned as an array of slreq.Requirement, slreq.Reference, or slreq.Justification array.

Examples

expand all

This example shows how to get the top-level items in a requirement set.

Open the ShortestPath project. Load the shortest_path_func_reqs requirement set.

openProject("ShortestPath");
rs = slreq.load("shortest_path_func_reqs");

Get the top-level items in the requirement set.

topItems = children(rs)
topItems=1×2 Requirement array with properties:
    Type
    Id
    Summary
    Description
    Keywords
    Rationale
    CreatedOn
    CreatedBy
    ModifiedBy
    IndexEnabled
    IndexNumber
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments
    Index

Tips

  • To get the child requirements of a requirement, use the children method of slreq.Requirement. To get the child referenced requirements of a referenced requirement, use the children method of slreq.Reference. To get the child justifications of a justification, use the children method of slreq.Justification.

Version History

Introduced in R2017b