Main Content

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

demote

类: slreq.Justification
命名空间: slreq

降级申述

语法

demote(jt)

说明

demote(jt)slreq.Justification 对象 jt 在层次结构中降级一个级别。

输入参数

全部展开

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

示例

降级申述

% Load a requirement set file and find justification objects 
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');

allJusts = find(rs, 'Type', 'Justification')

allJusts = 

  1×20 Justification array with properties:

    Id
    Summary
    Description
    Keywords
    Rationale
    CreatedOn
    CreatedBy
    ModifiedBy
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments

jt1 = allJusts(1);

% Find the children of jt1
childJusts = children(jt1)

childJusts = 

   1×10 Justification array with properties:

    Id
    Summary
    Description
    Keywords
    Rationale
    CreatedOn
    CreatedBy
    ModifiedBy
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments

% Demote the first child of jt1
demotedJustification = demote(childJusts(1));

% Find the parent of demotedJustification 
parentJustification = parent(demotedJustification)

parentJustification = 

    Justification with properties:

              Id: 'J1.1'
         Summary: 'Justifications'
     Description: ''
        Keywords: [0×0 char]
       Rationale: ''
       CreatedOn: 27-Feb-2014 10:15:38
       CreatedBy: 'Jane Doe'       
      ModifiedBy: 'John Doe'
             SID: 34
    FileRevision: 21
      ModifiedOn: 02-Aug-2017 13:49:40
           Dirty: 1
        Comments: [0×0 struct]

版本历史记录

在 R2018b 中推出

另请参阅

| |