Main Content

本页采用了机器翻译。点击此处可查看英文原文。

add

类: slreq.Justification
命名空间: slreq

添加子申述

语法

childJustification = add(jt)
childJustification = add(jt,PropertyName,PropertyValue,...,PropertyNameN,PropertyValueN)

说明

childJustification = add(jt) 向申述对象 jt 添加子申述。

childJustification = add(jt,PropertyName,PropertyValue,...,PropertyNameN,PropertyValueN) 添加了子申述,其附加属性由 PropertyNamePropertyValue 指定。

输入参数

全部展开

申述,指定为 slreq.Justification 对象。

申述属性名称,指定为字符串标量或字符向量。

有关更多信息,请参阅 slreq.Justification 属性

申述属性值,指定为字符串标量或字符向量。

输出参量

全部展开

新的子申述,作为 slreq.Justification 对象返回。

示例

全部展开

此示例显示如何在另一个申述下添加子申述。

加载名为 My_Requirement_Set_1 的需求集文件。

rs = slreq.load('C:\MATLAB\My_Requirement_Set_1.slreqx');

为需求集添加申述。

jt = addJustification(rs,"Id","J1",...
"Summary","Non-functional requirement justification");

为申述jt 添加子申述。

childJt = add(just1,"Id","J1.1",...
"Summary","Justification for non-functional requirement")
childJust1 = 

  Justification with properties:

              Id: 'J1.1'
         Summary: 'Justification for non-functional requirement'
     Description: ''
        Keywords: [0×0 char]
       Rationale: ''
       CreatedOn: 25-Aug-2017 11:21:29
       CreatedBy: 'John Doe'
      ModifiedBy: 'Jane Doe'
             SID: 11
    FileRevision: 2
      ModifiedOn: 25-Aug-2017 14:00:29
           Dirty: 0
        Comments: [0×0 struct]

提示

  • 要将顶级需求添加到需求集,请使用 slreq.ReqSetadd 方法。要将一个需求添加为另一个需求的子项,请使用 slreq.Requirementadd 方法。要将引用需求添加为另一个引用需求的子项,请使用 slreq.Referenceadd 方法。

版本历史记录

在 R2018b 中推出