Methods
(async, static) appendField(field) → {Promise}
追加字段
Parameters:
| Name | Type | Description |
|---|---|---|
field |
字段对象 |
Returns:
大于0成功,否则失败
- Type
- Promise
(async, static) calLengthOffset() → {Promise}
计算各字段的二进制长度,字段偏移
Returns:
长度偏移值
- Type
- Promise
(async, static) calSize() → {Promise}
计算属性结构占用存储空间大小
Returns:
占用存储空间大小
- Type
- Promise
(async, static) createObj() → {Promise.<Fields>}
构造一个新的 Fields 对象。
Returns:
- Type
- Promise.<Fields>
(async, static) deleteFieldByIndex(index) → {Promise}
根据字段序号删除字段
Parameters:
| Name | Type | Description |
|---|---|---|
index |
字段序号 |
Returns:
大于0成功,否则失败
- Type
- Promise
(async, static) deleteFieldByName(fldName) → {Promise}
根据字段名删除字段
Parameters:
| Name | Type | Description |
|---|---|---|
fldName |
字段名 |
Returns:
大于0成功,否则失败
- Type
- Promise
(async, static) getField(index) → {Promise.<Field>}
根据索引取字段
Parameters:
| Name | Type | Description |
|---|---|---|
index |
索引 |
Returns:
字段对象
- Type
- Promise.<Field>
(async, static) getFieldCount() → {Promise}
取字段数目
Returns:
字段数目
- Type
- Promise
(async, static) insertField(position, field) → {Promise}
插入字段
Parameters:
| Name | Type | Description |
|---|---|---|
position |
位置 | |
field |
字段对象 |
Returns:
大于0成功,否则失败
- Type
- Promise
(async, static) setField(index, field) → {Promise.<void>}
设置索引处的字段
Parameters:
| Name | Type | Description |
|---|---|---|
index |
索引 | |
field |
字段对象 |
Returns:
大于0成功,否则失败
- Type
- Promise.<void>