Main Content

children

Class: slreq.Reference
Namespace: slreq

Find children references

Syntax

childRefs = children(ref)

Description

childRefs = children(ref) returns the child referenced requirements childRefs of the slreq.Reference object ref.

Input Arguments

expand all

Reference to a requirement specified as an slreq.Reference object.

Output Arguments

expand all

The child referenced requirements belonging to the referenced requirement ref, returned as slreq.Reference objects.

Examples

Find Child References

% Load a requirement set file and find referenced requirements 
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');
allRefs = find(rs, 'Type', 'Reference')

allRefs = 

  1×32 Reference array with properties:

    Keywords
    Artifact
    Id
    Summary
    Description
    SID
    Domain
    SynchronizedOn
    ModifiedOn

ref1 = allRefs(1);

% Find the children of ref1
childRef = children(ref1)

childRef = 

  Reference with properties:

          Keywords: [0×0 char]
          Artifact: 'Req_doc.docx'
                Id: 'R1.1'
           Summary: 'References'
       Description: ''
               SID: 2
            Domain: 'linktype_rmi_word'
    SynchronizedOn: 26-Jul-2015 15:45:22
        ModifiedOn: 27-Jul-2015 12:00:13

Tips

  • To get the top-level items in a requirement set, use the children method of slreq.ReqSet. To get the child requirements of a requirement, use the children method of slreq.Requirement. To get the child justifications of a justification, use the children method of slreq.Justification.

Version History

Introduced in R2018a