Main Content

remove

Class: slreq.Reference
Package: slreq

Remove referenced requirements

Syntax

count = remove(topRef)

Description

count = remove(topRef) removes all the child referenced requirements under the Import node topRef as well as the Import node itself. The function returns the number of referenced requirements removed.

Input Arguments

expand all

Import node, specified as an slreq.Reference object.

Output Arguments

expand all

The number of referenced requirements removed, returned as a double.

Examples

Remove Referenced Requirements

% Load a requirement set file
rs = slreq.load('C:\MATLAB\My_Requirement_Set_1.slreqx');

% Find all referenced requirements in the requirement set
allRefs = find(rs, 'Type', 'Reference')

allRefs = 

  1×46 Reference array with properties:

    Id
    CustomId
    Artifact
    ArtifactId
    Domain
    UpdatedOn
    CreatedOn
    CreatedBy
    ModifiedBy
    IsLocked
    Summary
    Description
    Rationale
    Keywords
    Type
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments

% Remove the top Import node and child referenced requirements under it
count = remove(allRefs(1))

count =

    46

See Also

Introduced in R2019a