xrtValueToTyped
把动态值安全转换为一个新初始化的运行时类型值。
bool xrtValueToTyped( const xvalue* pSource, const xrttype* pTargetType, ptr pTarget, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xvalue* pSource | 来源 |
| const xrttype* pTargetType | TargetTye 参数 |
| ptr pTarget | 目标 |
| const xvalueconverter* pConverter | 转换器 |
返回:把动态值安全转换为一个新初始化的运行时类型值。
示例已编译验证
/* 把动态值安全转换为一个新初始化的运行时类型值。 */ result = xrtValueToTyped(pSource, pTargetType, pTarget, pConverter);
xrtValueFromTyped
把运行时类型值转换为一个独立动态值。
xvalue* xrtValueFromTyped( const xrttype* pSourceType, const void* pSource, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xrttype* pSourceType | SourceTye 参数 |
| const void* pSource | 来源 |
| const xvalueconverter* pConverter | 转换器 |
返回:把运行时类型值转换为一个独立动态值。
示例已编译验证
/* 把运行时类型值转换为一个独立动态值。 */ result = xrtValueFromTyped(pSourceType, pSource, pConverter);
xrtTypedArrayPushValue
把一个动态值转换后追加到类型数组。
bool xrtTypedArrayPushValue( xtypedarray* pArray, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedarray* pArray | 数组对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:把一个动态值转换后追加到类型数组。
示例已编译验证
/* 把一个动态值转换后追加到类型数组。 */ result = xrtTypedArrayPushValue(pArray, pValue, pConverter);
xrtTypedArrayInsertValue
把一个动态值转换后插入类型数组的指定下标。
bool xrtTypedArrayInsertValue( xtypedarray* pArray, size_t iIndex, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedarray* pArray | 数组对象 |
| size_t iIndex | 下标 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:把一个动态值转换后插入类型数组的指定下标。
示例已编译验证
/* 把一个动态值转换后插入类型数组的指定下标。 */ result = xrtTypedArrayInsertValue(pArray, iIndex, pValue, pConverter);
xrtTypedArraySetValue
把一个动态值转换后原子替换类型数组的指定元素。
bool xrtTypedArraySetValue( xtypedarray* pArray, size_t iIndex, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedarray* pArray | 数组对象 |
| size_t iIndex | 下标 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:把一个动态值转换后原子替换类型数组的指定元素。
示例已编译验证
/* 把一个动态值转换后原子替换类型数组的指定元素。 */ result = xrtTypedArraySetValue(pArray, iIndex, pValue, pConverter);
xrtTypedArrayGetValue
把类型数组的指定元素转换为调用方拥有的动态值。
xvalue* xrtTypedArrayGetValue( const xtypedarray* pArray, size_t iIndex, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedarray* pArray | 数组对象 |
| size_t iIndex | 下标 |
| const xvalueconverter* pConverter | 转换器 |
返回:把类型数组的指定元素转换为调用方拥有的动态值。
示例已编译验证
/* 把类型数组的指定元素转换为调用方拥有的动态值。 */ result = xrtTypedArrayGetValue(pArray, iIndex, pConverter);
xrtTypedArrayTakeValue
转换并删除类型数组的指定元素;转换失败时数组保持不变。
xvalue* xrtTypedArrayTakeValue( xtypedarray* pArray, size_t iIndex, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedarray* pArray | 数组对象 |
| size_t iIndex | 下标 |
| const xvalueconverter* pConverter | 转换器 |
返回:转换并删除类型数组的指定元素;转换失败时数组保持不变。
示例已编译验证
/* 转换并删除类型数组的指定元素;转换失败时数组保持不变。 */ result = xrtTypedArrayTakeValue(pArray, iIndex, pConverter);
xrtTypedArrayPopValue
转换并删除类型数组的末尾元素;转换失败时数组保持不变。
xvalue* xrtTypedArrayPopValue( xtypedarray* pArray, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedarray* pArray | 数组对象 |
| const xvalueconverter* pConverter | 转换器 |
返回:转换并删除类型数组的末尾元素;转换失败时数组保持不变。
示例已编译验证
/* 转换并删除类型数组的末尾元素;转换失败时数组保持不变。 */ result = xrtTypedArrayPopValue(pArray, pConverter);
xrtTypedArrayFindValue
把动态值转换为元素类型并查找第一处相等元素。
size_t xrtTypedArrayFindValue( const xtypedarray* pArray, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedarray* pArray | 数组对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:把动态值转换为元素类型并查找第一处相等元素。
示例已编译验证
/* 把动态值转换为元素类型并查找第一处相等元素。 */ result = xrtTypedArrayFindValue(pArray, pValue, pConverter);
xrtTypedArrayContainsValue
判断类型数组是否包含与动态值等价的元素。
bool xrtTypedArrayContainsValue( const xtypedarray* pArray, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedarray* pArray | 数组对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:判断类型数组是否包含与动态值等价的元素。
示例已编译验证
/* 判断类型数组是否包含与动态值等价的元素。 */ result = xrtTypedArrayContainsValue(pArray, pValue, pConverter);
xrtTypedArrayFromValue
把动态稠密数组深转换为独立的同构类型数组。
xtypedarray* xrtTypedArrayFromValue( const xvalue* pSource, const xrttype* pItemType, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xvalue* pSource | 来源 |
| const xrttype* pItemType | ItemTye 参数 |
| const xvalueconverter* pConverter | 转换器 |
返回:把动态稠密数组深转换为独立的同构类型数组。
示例已编译验证
/* 把动态稠密数组深转换为独立的同构类型数组。 */ result = xrtTypedArrayFromValue(pSource, pItemType, pConverter);
xrtTypedArrayToValue
把类型数组深转换为独立的动态稠密数组。
xvalue* xrtTypedArrayToValue( const xtypedarray* pArray, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedarray* pArray | 数组对象 |
| const xvalueconverter* pConverter | 转换器 |
返回:把类型数组深转换为独立的动态稠密数组。
示例已编译验证
/* 把类型数组深转换为独立的动态稠密数组。 */ result = xrtTypedArrayToValue(pArray, pConverter);
xrtTypedListSetValue
把一个动态值转换后写入类型列表的指定整数键。
bool xrtTypedListSetValue( xtypedlist* pList, int64 iKey, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedlist* pList | 列表对象 |
| int64 iKey | 键 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:把一个动态值转换后写入类型列表的指定整数键。
示例已编译验证
/* 把一个动态值转换后写入类型列表的指定整数键。 */ result = xrtTypedListSetValue(pList, iKey, pValue, pConverter);
xrtTypedListAppendValue
把一个动态值转换后追加到最大键之后。
bool xrtTypedListAppendValue( xtypedlist* pList, const xvalue* pValue, int64* pKey, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedlist* pList | 列表对象 |
| const xvalue* pValue | 值 |
| int64* pKey | 键 |
| const xvalueconverter* pConverter | 转换器 |
返回:把一个动态值转换后追加到最大键之后。
示例已编译验证
/* 把一个动态值转换后追加到最大键之后。 */ result = xrtTypedListAppendValue(pList, pValue, pKey, pConverter);
xrtTypedListGetValue
把指定整数键的类型值转换为调用方拥有的动态值。
xvalue* xrtTypedListGetValue( const xtypedlist* pList, int64 iKey, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedlist* pList | 列表对象 |
| int64 iKey | 键 |
| const xvalueconverter* pConverter | 转换器 |
返回:把指定整数键的类型值转换为调用方拥有的动态值。
示例已编译验证
/* 把指定整数键的类型值转换为调用方拥有的动态值。 */ result = xrtTypedListGetValue(pList, iKey, pConverter);
xrtTypedListTakeValue
转换并删除指定整数键的类型值;转换失败时列表保持不变。
xvalue* xrtTypedListTakeValue( xtypedlist* pList, int64 iKey, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedlist* pList | 列表对象 |
| int64 iKey | 键 |
| const xvalueconverter* pConverter | 转换器 |
返回:转换并删除指定整数键的类型值;转换失败时列表保持不变。
示例已编译验证
/* 转换并删除指定整数键的类型值;转换失败时列表保持不变。 */ result = xrtTypedListTakeValue(pList, iKey, pConverter);
xrtTypedListFindValue
把动态值转换为元素类型并查找第一处相等值。
bool xrtTypedListFindValue( const xtypedlist* pList, const xvalue* pValue, int64* pKey, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedlist* pList | 列表对象 |
| const xvalue* pValue | 值 |
| int64* pKey | 键 |
| const xvalueconverter* pConverter | 转换器 |
返回:把动态值转换为元素类型并查找第一处相等值。
示例已编译验证
/* 把动态值转换为元素类型并查找第一处相等值。 */ result = xrtTypedListFindValue(pList, pValue, pKey, pConverter);
xrtTypedListContainsValue
判断类型列表是否包含与动态值等价的元素。
bool xrtTypedListContainsValue( const xtypedlist* pList, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedlist* pList | 列表对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:判断类型列表是否包含与动态值等价的元素。
示例已编译验证
/* 判断类型列表是否包含与动态值等价的元素。 */ result = xrtTypedListContainsValue(pList, pValue, pConverter);
xrtTypedListFromValue
把动态整数映射深转换为独立的同构稀疏类型列表。
xtypedlist* xrtTypedListFromValue( const xvalue* pSource, const xrttype* pItemType, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xvalue* pSource | 来源 |
| const xrttype* pItemType | ItemTye 参数 |
| const xvalueconverter* pConverter | 转换器 |
返回:把动态整数映射深转换为独立的同构稀疏类型列表。
示例已编译验证
/* 把动态整数映射深转换为独立的同构稀疏类型列表。 */ result = xrtTypedListFromValue(pSource, pItemType, pConverter);
xrtTypedListToValue
把稀疏类型列表深转换为独立的动态整数映射。
xvalue* xrtTypedListToValue( const xtypedlist* pList, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedlist* pList | 列表对象 |
| const xvalueconverter* pConverter | 转换器 |
返回:把稀疏类型列表深转换为独立的动态整数映射。
示例已编译验证
/* 把稀疏类型列表深转换为独立的动态整数映射。 */ result = xrtTypedListToValue(pList, pConverter);
xrtTypedSetAddValue
把一个动态值转换后加入类型集合。
bool xrtTypedSetAddValue( xtypedset* pSet, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedset* pSet | 集合对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:把一个动态值转换后加入类型集合。
示例已编译验证
/* 把一个动态值转换后加入类型集合。 */ result = xrtTypedSetAddValue(pSet, pValue, pConverter);
xrtTypedSetGetValue
返回与动态值等价的规范元素副本。
xvalue* xrtTypedSetGetValue( const xtypedset* pSet, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedset* pSet | 集合对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:返回与动态值等价的规范元素副本。
示例已编译验证
/* 返回与动态值等价的规范元素副本。 */ result = xrtTypedSetGetValue(pSet, pValue, pConverter);
xrtTypedSetHasValue
判断类型集合是否拥有与动态值等价的元素。
bool xrtTypedSetHasValue( const xtypedset* pSet, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedset* pSet | 集合对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:判断类型集合是否拥有与动态值等价的元素。
示例已编译验证
/* 判断类型集合是否拥有与动态值等价的元素。 */ result = xrtTypedSetHasValue(pSet, pValue, pConverter);
xrtTypedSetRemoveValue
删除与动态值等价的元素。
bool xrtTypedSetRemoveValue( xtypedset* pSet, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedset* pSet | 集合对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:删除与动态值等价的元素。
示例已编译验证
/* 删除与动态值等价的元素。 */ result = xrtTypedSetRemoveValue(pSet, pValue, pConverter);
xrtTypedSetTakeValue
转换并删除规范元素;转换失败时集合保持不变。
xvalue* xrtTypedSetTakeValue( xtypedset* pSet, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypedset* pSet | 集合对象 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:转换并删除规范元素;转换失败时集合保持不变。
示例已编译验证
/* 转换并删除规范元素;转换失败时集合保持不变。 */ result = xrtTypedSetTakeValue(pSet, pValue, pConverter);
xrtTypedSetFromValue
把动态集合深转换为独立的同构类型集合。
xtypedset* xrtTypedSetFromValue( const xvalue* pSource, const xrttype* pItemType, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xvalue* pSource | 来源 |
| const xrttype* pItemType | ItemTye 参数 |
| const xvalueconverter* pConverter | 转换器 |
返回:把动态集合深转换为独立的同构类型集合。
示例已编译验证
/* 把动态集合深转换为独立的同构类型集合。 */ result = xrtTypedSetFromValue(pSource, pItemType, pConverter);
xrtTypedSetToValue
把类型集合深转换为独立的动态集合。
xvalue* xrtTypedSetToValue( const xtypedset* pSet, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypedset* pSet | 集合对象 |
| const xvalueconverter* pConverter | 转换器 |
返回:把类型集合深转换为独立的动态集合。
示例已编译验证
/* 把类型集合深转换为独立的动态集合。 */ result = xrtTypedSetToValue(pSet, pConverter);
xrtTypedDictSetValue
把一个动态值转换后写入类型字典的指定文本键。
bool xrtTypedDictSetValue( xtypeddict* pDict, xstrview Key, const xvalue* pValue, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypeddict* pDict | 字典 |
| xstrview Key | 键 |
| const xvalue* pValue | 值 |
| const xvalueconverter* pConverter | 转换器 |
返回:把一个动态值转换后写入类型字典的指定文本键。
示例已编译验证
/* 把一个动态值转换后写入类型字典的指定文本键。 */ result = xrtTypedDictSetValue(pDict, Key, pValue, pConverter);
xrtTypedDictGetValue
把指定文本键的类型值转换为调用方拥有的动态值。
xvalue* xrtTypedDictGetValue( const xtypeddict* pDict, xstrview Key, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypeddict* pDict | 字典 |
| xstrview Key | 键 |
| const xvalueconverter* pConverter | 转换器 |
返回:把指定文本键的类型值转换为调用方拥有的动态值。
示例已编译验证
/* 把指定文本键的类型值转换为调用方拥有的动态值。 */ result = xrtTypedDictGetValue(pDict, Key, pConverter);
xrtTypedDictTakeValue
转换并删除指定文本键的类型值;转换失败时字典保持不变。
xvalue* xrtTypedDictTakeValue( xtypeddict* pDict, xstrview Key, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| xtypeddict* pDict | 字典 |
| xstrview Key | 键 |
| const xvalueconverter* pConverter | 转换器 |
返回:转换并删除指定文本键的类型值;转换失败时字典保持不变。
示例已编译验证
/* 转换并删除指定文本键的类型值;转换失败时字典保持不变。 */ result = xrtTypedDictTakeValue(pDict, Key, pConverter);
xrtTypedDictFromValue
把动态字符串键对象深转换为独立的同构类型字典。
xtypeddict* xrtTypedDictFromValue( const xvalue* pSource, const xrttype* pItemType, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xvalue* pSource | 来源 |
| const xrttype* pItemType | ItemTye 参数 |
| const xvalueconverter* pConverter | 转换器 |
返回:把动态字符串键对象深转换为独立的同构类型字典。
示例已编译验证
/* 把动态字符串键对象深转换为独立的同构类型字典。 */ result = xrtTypedDictFromValue(pSource, pItemType, pConverter);
xrtTypedDictToValue
把类型字典深转换为独立的动态字符串键对象。
xvalue* xrtTypedDictToValue( const xtypeddict* pDict, const xvalueconverter* pConverter );
| 参数 | 说明 |
|---|---|
| const xtypeddict* pDict | 字典 |
| const xvalueconverter* pConverter | 转换器 |
返回:把类型字典深转换为独立的动态字符串键对象。
示例已编译验证
/* 把类型字典深转换为独立的动态字符串键对象。 */ result = xrtTypedDictToValue(pDict, pConverter);