slreq.Requirement 类
命名空间: slreq
使用需求对象
描述
slreq.Requirement
的实例是您仅在 Requirements Toolbox™ 内部管理的需求对象,并且与外部应用程序管理的工件没有持久关联。需求对象只能存在于需求集内。
创建对象
在需求集req
= find(rs
, 'PropertyName'
, PropertyValue
)rs
中查找并返回需求 req
,该需求具有由 PropertyName
和 PropertyValue
指定的附加需求属性。
将需求 req
= add(rs
, 'PropertyName'
, PropertyValue
)req
添加到需求集rs
中,并添加由 PropertyName
和 PropertyValue
指定的附加需求属性。
输入参量
rs
— 需求集对象
slreq.ReqSet
对象
需求集,指定为 slreq.ReqSet
对象。
输出参量
req
— 需求对象
slreq.Requirement
对象
处理需求,作为 slreq.Requirement
对象返回。
属性
Type
— 需求类型
"Functional"
| "Informational"
| "Container"
| 字符串标量 | 字符向量
需求类型,指定为 "Functional"
、"Informational"
、"Container"
,或者指定自定义需求类型或原型的字符串标量或原型。有关更多信息,请参阅 需求类型。
属性:
GetAccess | public |
SetAccess | public |
Id
— 需求自定义 ID
字符串标量 | 字符向量
需求的自定义 ID,指定为字符串标量或字符向量。自定义 ID 中不能使用空格和 '#'
。
属性:
GetAccess | public |
SetAccess | public |
Summary
— 需求摘要
字符串标量 | 字符向量
需求摘要文本,指定为字符串标量或字符向量。
属性:
GetAccess | public |
SetAccess | public |
Description
— 需求描述
字符串标量 | 字符向量
需求描述文本,指定为字符串标量或字符向量。
属性:
GetAccess | public |
SetAccess | public |
Keywords
— 需求关键字
字符串数组 | 元胞数组
需求关键字,指定为字符串数组或字符元胞数组。
属性:
GetAccess | public |
SetAccess | public |
Rationale
— 需求理由
字符串标量 | 字符向量
需求理由文本,指定为字符串标量或字符向量。
属性:
GetAccess | public |
SetAccess | public |
CreatedOn
— 需求创建日期
datetime
值
需求创建的日期,指定为 datetime
值。软件会填充该属性。
属性:
GetAccess | public |
SetAccess | private |
CreatedBy
— 需求创建者
字符向量
创建需求的个人或组织的名称。
属性:
GetAccess | public |
SetAccess | private |
ModifiedBy
— 需求修饰符
字符向量
最后修改需求的个人或组织的名称。
属性:
GetAccess | public |
SetAccess | private |
IndexEnabled
— 索引启用指示器
1
(默认) | 0
指示索引是否启用(1
)或禁用(0
),以数据类型为 logical
的 1
或 0
返回。如果禁用索引,Requirements Toolbox 在创建编号层次结构列表时不会计算此需求。然而,该需求在层次结构中仍然处于相同的位置。
属性:
GetAccess | public |
SetAccess | public |
SID
— 需求会话独立标识符
字符向量
与需求相对应的会话独立标识符,指定为字符向量。
属性:
GetAccess | public |
SetAccess | private |
FileRevision
— 需求修订号
标量
需求修订号,以标量形式返回。当您创建新需求时,FileRevision
属性与需求集修订号相匹配。当您修改需求并保存需求集时,需求集修订号会增加一,并且 FileRevision
属性会更新以匹配新的需求集修订号。仅当您保存对需求的更改时,FileRevision
属性才会更新。
属性:
GetAccess | public |
SetAccess | private |
ModifiedOn
— 修改日期需求
datetime
值
需求最后修改的日期,指定为 datetime
值。软件会填充该属性。
属性:
GetAccess | public |
SetAccess | private |
Dirty
— 未保存更改指示
0
| 1
指示需求是否有未保存的更改(1
)或没有未保存的更改(0
)。
属性:
GetAccess | public |
SetAccess | private |
Comments
— 需求注释
结构体数组
随需求附带的注释,以结构体形式指定。
属性:
GetAccess | public |
SetAccess | private |
Index
— 需求索引
字符数组
需求的索引,指定为字符数组。
属性:
GetAccess | public |
SetAccess | private |
方法
add | 添加子需求 |
addComment | 为需求添加注释 |
children | 查找需求的子需求 |
copy | 复制和粘贴需求 |
demote | 降低需求 |
find | 查找满足父级需求的子级 |
getAttribute | 获取需求属性值 |
getDescriptionAsText | 以纯文本形式获取需求描述 |
getImplementationStatus | 查询需求实施状态摘要 |
getRationaleAsText | 以纯文本形式获取需求原理 |
getVerificationStatus | 查询需求验证状态摘要 |
inLinks | 获取需求的入站链接 |
isFilteredIn | 检查已过滤的需求 |
isJustifiedFor | 检查需求是否已申述 |
justifyImplementation | 申述需求以实施 |
justifyVerification | 申述用于验证的需求 |
move | 按层次结构移动需求 |
moveDown | 将需求在层次结构中下移 |
moveUp | 将需求在层次结构中向上移动 |
outLinks | 获取需求的出向链接 |
parent | 查找需求的父项 |
promote | 提升需求 |
remove | 从需求集删除需求 |
reqSet | 返回父级需求集 |
setAttribute | 设置需求属性值 |
示例
在需求集中查找需求
此示例显示如何在需求集查找需求。
加载名为 myReqSet
的需求集。
rs = slreq.load("myReqSet");
在需求集查找 ID 为 77
的需求。
req = find(rs,"Type","Requirement","ID","77");
req = Requirement with properties: Id: '77' Summary: 'Test Spec' Keywords: [0×0 char] Description: '' Rationale: '' SID: 80 CreatedBy: 'John Doe' CreatedOn: 05-Oct-2007 16:09:38 ModifiedBy: 'Jane Doe' ModifiedOn: 21-Dec-2016 11:10:05 Comments: [0×0 struct]
版本历史记录
在 R2018a 中推出
另请参阅
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)