Класс: slreq.Requirement
Пакет: slreq
Найдите родительский элемент требования
parentObj = parent(req)
возвращает родительский объект parentObj
= parent(req
)parentObj
из slreq.Requirement
объект req
.
% Load a requirements set file and add two new requirements rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx'); req1 = add(rs, 'Id', '5', 'Summary' , 'Additional Requirement'); req2 = add(req1, 'Id', '5.1', 'Summary' , 'Additional Child Requirement'); % Find the parent of req2 parentReq1 = parent(req2) parentReq1 = Requirement with properties: Id: '5' Summary: 'Additional Requirement' Keywords: [0×0 char] Description: '' Rationale: '' SID: 10 CreatedBy: 'John Doe' CreatedOn: 05-Oct-2007 16:09:38 ModifiedBy: 'Jane Doe' ModifiedOn: 21-Dec-2016 11:10:05 Comments: [0×0 struct] % Find the parent of req1 parentReq2 = parent(req1) parentReq2 = ReqSet with properties: Description: '' Name: 'My_Requirements_Set_1' Filename: 'C:\MATLAB\My_Requirements_Set_1.slreqx' Revision: 6 Dirty: 1 CustomAttributeNames: {}