Main Content

promote

クラス: slreq.Justification
名前空間: slreq

構文

promote(jt)

説明

promote(jt) は、slreq.Justification オブジェクトの jt を階層内の 1 つ上のレベルに昇格します。

入力引数

すべて展開する

正当化。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

% Promote the first child of jt1
promote(childJusts(1));

% Find the parent of childJusts(1)
parentJustification = parent(childJusts(1))

parentJustification = 

  ReqSet with properties:

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

バージョン履歴

R2018b で導入