xrtTypeCanWiden
判断源类型的全部有效值是否都能被目标类型无损表示。
bool xrtTypeCanWiden( const xrttype* pSourceType, const xrttype* pTargetType );
| 参数 | 说明 |
|---|---|
| const xrttype* pSourceType | SourceTye 参数 |
| const xrttype* pTargetType | TargetTye 参数 |
返回:判断源类型的全部有效值是否都能被目标类型无损表示。
示例已编译验证
/* 判断源类型的全部有效值是否都能被目标类型无损表示。 */ result = xrtTypeCanWiden(pSourceType, pTargetType);
xrtTypeCanConvert
判断两个类型在指定模式下是否存在稳定的内建转换路径。
bool xrtTypeCanConvert( const xrttype* pSourceType, const xrttype* pTargetType, xtypeconvertmode Mode );
| 参数 | 说明 |
|---|---|
| const xrttype* pSourceType | SourceTye 参数 |
| const xrttype* pTargetType | TargetTye 参数 |
| xtypeconvertmode Mode | 模式 |
返回:判断两个类型在指定模式下是否存在稳定的内建转换路径。
示例已编译验证
/* 判断两个类型在指定模式下是否存在稳定的内建转换路径。 */ result = xrtTypeCanConvert(pSourceType, pTargetType, Mode);
xrtTypeConvert
XRT_API bool xrtTypeConvert( const xrttype* pSourceType, const void* pSource, const xrttype* pTargetType, ptr pTarget, xtypeconvertmode Mode );
;
返回:XRT_API bool xrtTypeConvert( const xrttype* pSourceType, const void* pSource, const xrttype* pTargetType, ptr pTarget, xtypeconvertmode Mode );
示例已编译验证
/* XRT_API bool xrtTypeConvert( const xrttype* pSourceType, const void* pSource, const xrttype* pTargetType, ptr pTarget, xtypeconvertmode Mode ); */ result = xrtTypeConvert();
xrtTypeFormat
XRT_API bool xrtTypeFormat( const xrttype* pType, const void* pValue, xrttypewriter pWrite, ptr pContext );
;
返回:XRT_API bool xrtTypeFormat( const xrttype* pType, const void* pValue, xrttypewriter pWrite, ptr pContext );
示例已编译验证
/* XRT_API bool xrtTypeFormat( const xrttype* pType, const void* pValue, xrttypewriter pWrite, ptr pContext ); */ result = xrtTypeFormat();
xrtTypeToString
把借用类型值格式化为由 xrtFree 释放的零结尾 UTF-8 字符串。
str xrtTypeToString( const xrttype* pType, const void* pValue );
| 参数 | 说明 |
|---|---|
| const xrttype* pType | 类型 |
| const void* pValue | 值 |
返回:把借用类型值格式化为由 xrtFree 释放的零结尾 UTF-8 字符串。
示例已编译验证
/* 把借用类型值格式化为由 xrtFree 释放的零结尾 UTF-8 字符串。 */ result = xrtTypeToString(pType, pValue);
xrtValueConvertTo
XRT_API bool xrtValueConvertTo( const xvalue* pSource, const xrttype* pTargetType, ptr pTarget, xtypeconvertmode Mode );
;
返回:XRT_API bool xrtValueConvertTo( const xvalue* pSource, const xrttype* pTargetType, ptr pTarget, xtypeconvertmode Mode );
示例已编译验证
/* XRT_API bool xrtValueConvertTo( const xvalue* pSource, const xrttype* pTargetType, ptr pTarget, xtypeconvertmode Mode ); */ result = xrtValueConvertTo();