Ets_Shape_Attr_Add()
注意: 需要 OPNET Development Kit
摘要
为形状添加或更新属性。
语法
Ets_Shape_Attr_Add (shape_hndl, attr_name, attr_type, attr_value)
| 参数 | 类型 | 说明 |
|---|---|---|
shape_hndl |
EtsT_Shape_Handle |
目标形状的句柄。 |
attr_name |
const char * |
要添加的属性名称。 |
attr_type |
EtsT_Attr_Type |
要添加的属性类型(使用 Table 26 中的属性类型常量)。 |
attr_value |
const void * |
指向属性值的指针。 |
返回类型
EtsT_Compcode
EtsC_Compcode_Success 或 EtsC_Compcode_Failure。
头文件
ets_api_shapeset.h
详情
该函数为指定形状添加给定名称和类型的属性。如果该属性已存在,函数将用 attr_type 和 attr_value 指定的类型和值替换现有属性的类型和值。