Main Content

parent

Class: slreq.Reference
Namespace: slreq

Find parent item of referenced requirement

Syntax

parentObj = parent(ref)

Description

parentObj = parent(ref) returns the parent object parentObj of the slreq.Reference object req.

Input Arguments

expand all

Referenced requirement specified as an slreq.Reference object.

Output Arguments

expand all

The parent of the referenced requirement ref, returned as an slreq.Reference object or as an slreq.ReqSet object.

Examples

Find Parent References

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

refs = 

  1×32 Reference array with properties:

    Keywords
    Artifact
    Id
    Summary
    Description
    SID
    Domain
    SynchronizedOn
    ModifiedOn

% Find the parent of the first reference element
parentRef1 = parent(refs(1));

parentRef1 = 

  ReqSet with properties:

             Description: ''
                    Name: 'My_Requirements_Set_1'
                Filename: 'C:\MATLAB\My_Requirements_Set_1.slreqx'
                Revision: 6
                   Dirty: 1
    CustomAttributeNames: {}

Version History

Introduced in R2018a