xrtTypedListInit

初始化、创建、结束或销毁一个拥有类型值的空稀疏列表。

bool xrtTypedListInit( xtypedlist* pList, const xrttype* pItemType );
参数说明
xtypedlist* pList列表对象
const xrttype* pItemTypeItemTye 参数
返回:初始化、创建、结束或销毁一个拥有类型值的空稀疏列表。

示例已编译验证

typedlistinit obj;
xrtTypedListInit(&obj, pList, pItemType);

xrtTypedListCreate

XRT_API xtypedlist* xrtTypedListCreate(const xrttype* pItemType);

;
返回:XRT_API xtypedlist* xrtTypedListCreate(const xrttype* pItemType);

示例已编译验证

/* XRT_API xtypedlist* xrtTypedListCreate(const xrttype* pItemType); */
xhandle* h = xrtTypedListCreate();

xrtTypedListUnit

XRT_API void xrtTypedListUnit(xtypedlist* pList);

;
返回:XRT_API void xrtTypedListUnit(xtypedlist* pList);

示例已编译验证

xrtTypedListUnit(obj);

xrtTypedListDestroy

XRT_API void xrtTypedListDestroy(xtypedlist* pList);

;
返回:XRT_API void xrtTypedListDestroy(xtypedlist* pList);

示例已编译验证

xrtTypedListDestroy(obj);

xrtTypedListItemType

返回借用元素类型和当前键值数量。

const xrttype* xrtTypedListItemType(const xtypedlist* pList);
参数说明
const xtypedlist* pList列表对象
返回:返回借用元素类型和当前键值数量。

示例已编译验证

/* 返回借用元素类型和当前键值数量。 */
result = xrtTypedListItemType(pList);

xrtTypedListCount

XRT_API size_t xrtTypedListCount(const xtypedlist* pList);

;
返回:XRT_API size_t xrtTypedListCount(const xtypedlist* pList);

示例已编译验证

/* XRT_API size_t xrtTypedListCount(const xtypedlist* pList); */
result = xrtTypedListCount();

xrtTypedListClear

清空全部值,或释放空闲节点池页。

bool xrtTypedListClear(xtypedlist* pList);
参数说明
xtypedlist* pList列表对象
返回:清空全部值,或释放空闲节点池页。

示例已编译验证

/* 清空全部值,或释放空闲节点池页。 */
result = xrtTypedListClear(pList);

xrtTypedListTrim

XRT_API size_t xrtTypedListTrim(xtypedlist* pList, size_t iRetainEmpty);

;
返回:XRT_API size_t xrtTypedListTrim(xtypedlist* pList, size_t iRetainEmpty);

示例已编译验证

/* XRT_API size_t xrtTypedListTrim(xtypedlist* pList, size_t iRetainEmpty); */
result = xrtTypedListTrim();

xrtTypedListSet

复制设置指定键,或在最大键后追加并返回实际键。

bool xrtTypedListSet( xtypedlist* pList, int64 iKey, const void* pItem );
参数说明
xtypedlist* pList列表对象
int64 iKey键
const void* pItem元素
返回:复制设置指定键,或在最大键后追加并返回实际键。

示例已编译验证

/* 复制设置指定键,或在最大键后追加并返回实际键。 */
result = xrtTypedListSet(pList, iKey, pItem);

xrtTypedListAppend

XRT_API bool xrtTypedListAppend( xtypedlist* pList, const void* pItem, int64* pKey );

;
返回:XRT_API bool xrtTypedListAppend( xtypedlist* pList, const void* pItem, int64* pKey );

示例已编译验证

/* XRT_API bool xrtTypedListAppend( xtypedlist* pList, const void* pItem, int64* pKey ); */
result = xrtTypedListAppend();

xrtTypedListGet

返回指定键的借用值槽;缺失键是正常结果。

ptr xrtTypedListGet(xtypedlist* pList, int64 iKey);
参数说明
xtypedlist* pList列表对象
int64 iKey键
返回:返回指定键的借用值槽;缺失键是正常结果。

示例已编译验证

/* 返回指定键的借用值槽;缺失键是正常结果。 */
result = xrtTypedListGet(pList, iKey);

xrtTypedListConstGet

XRT_API const void* xrtTypedListConstGet( const xtypedlist* pList, int64 iKey );

;
返回:XRT_API const void* xrtTypedListConstGet( const xtypedlist* pList, int64 iKey );

示例已编译验证

/* XRT_API const void* xrtTypedListConstGet( const xtypedlist* pList, int64 iKey ); */
result = xrtTypedListConstGet();

xrtTypedListHas

XRT_API bool xrtTypedListHas(const xtypedlist* pList, int64 iKey);

;
返回:XRT_API bool xrtTypedListHas(const xtypedlist* pList, int64 iKey);

示例已编译验证

/* XRT_API bool xrtTypedListHas(const xtypedlist* pList, int64 iKey); */
result = xrtTypedListHas();

xrtTypedListAt

按键顺序返回指定位置的借用值槽和可选实际键。

ptr xrtTypedListAt( xtypedlist* pList, size_t iIndex, int64* pKey );
参数说明
xtypedlist* pList列表对象
size_t iIndex下标
int64* pKey键
返回:按键顺序返回指定位置的借用值槽和可选实际键。

示例已编译验证

/* 按键顺序返回指定位置的借用值槽和可选实际键。 */
result = xrtTypedListAt(pList, iIndex, pKey);

xrtTypedListConstAt

XRT_API const void* xrtTypedListConstAt( const xtypedlist* pList, size_t iIndex, int64* pKey );

;
返回:XRT_API const void* xrtTypedListConstAt( const xtypedlist* pList, size_t iIndex, int64* pKey );

示例已编译验证

/* XRT_API const void* xrtTypedListConstAt( const xtypedlist* pList, size_t iIndex, int64* pKey ); */
result = xrtTypedListConstAt();

xrtTypedListRemove

删除指定键,或把值移动到外部已初始化输出后删除。

bool xrtTypedListRemove(xtypedlist* pList, int64 iKey);
参数说明
xtypedlist* pList列表对象
int64 iKey键
返回:删除指定键,或把值移动到外部已初始化输出后删除。

示例已编译验证

/* 删除指定键,或把值移动到外部已初始化输出后删除。 */
result = xrtTypedListRemove(pList, iKey);

xrtTypedListTake

XRT_API bool xrtTypedListTake( xtypedlist* pList, int64 iKey, ptr pValue );

;
返回:XRT_API bool xrtTypedListTake( xtypedlist* pList, int64 iKey, ptr pValue );

示例已编译验证

/* XRT_API bool xrtTypedListTake( xtypedlist* pList, int64 iKey, ptr pValue ); */
result = xrtTypedListTake();

xrtTypedListFind

查找第一个相等值或判断是否存在;未找到不设置错误。

bool xrtTypedListFind( const xtypedlist* pList, const void* pItem, int64* pKey );
参数说明
const xtypedlist* pList列表对象
const void* pItem元素
int64* pKey键
返回:查找第一个相等值或判断是否存在;未找到不设置错误。

示例已编译验证

/* 查找第一个相等值或判断是否存在;未找到不设置错误。 */
result = xrtTypedListFind(pList, pItem, pKey);

xrtTypedListContains

XRT_API bool xrtTypedListContains( const xtypedlist* pList, const void* pItem );

;
返回:XRT_API bool xrtTypedListContains( const xtypedlist* pList, const void* pItem );

示例已编译验证

/* XRT_API bool xrtTypedListContains( const xtypedlist* pList, const void* pItem ); */
result = xrtTypedListContains();

xrtTypedListMerge

失败原子地合并同类型列表、深复制列表或比较键值内容。

bool xrtTypedListMerge( xtypedlist* pTarget, const xtypedlist* pSource, bool bReplace );
参数说明
xtypedlist* pTarget目标
const xtypedlist* pSource来源
bool bReplace是否替换
返回:失败原子地合并同类型列表、深复制列表或比较键值内容。

示例已编译验证

/* 失败原子地合并同类型列表、深复制列表或比较键值内容。 */
result = xrtTypedListMerge(pTarget, pSource, bReplace);

xrtTypedListClone

XRT_API xtypedlist* xrtTypedListClone(const xtypedlist* pList);

;
返回:XRT_API xtypedlist* xrtTypedListClone(const xtypedlist* pList);

示例已编译验证

/* XRT_API xtypedlist* xrtTypedListClone(const xtypedlist* pList); */
result = xrtTypedListClone();

xrtTypedListEquals

XRT_API bool xrtTypedListEquals( const xtypedlist* pLeft, const xtypedlist* pRight );

;
返回:XRT_API bool xrtTypedListEquals( const xtypedlist* pLeft, const xtypedlist* pRight );

示例已编译验证

/* XRT_API bool xrtTypedListEquals( const xtypedlist* pLeft, const xtypedlist* pRight ); */
result = xrtTypedListEquals();

xrtTypedListIterBegin

启动完整或有界的正反迭代。

bool xrtTypedListIterBegin( xtypedlist* pList, xtypedlistiter* pIterator );
参数说明
xtypedlist* pList列表对象
xtypedlistiter* pIterator迭代器
返回:启动完整或有界的正反迭代。

示例已编译验证

/* 启动完整或有界的正反迭代。 */
result = xrtTypedListIterBegin(pList, pIterator);

xrtTypedListIterRBegin

XRT_API bool xrtTypedListIterRBegin( xtypedlist* pList, xtypedlistiter* pIterator );

;
返回:XRT_API bool xrtTypedListIterRBegin( xtypedlist* pList, xtypedlistiter* pIterator );

示例已编译验证

/* XRT_API bool xrtTypedListIterRBegin( xtypedlist* pList, xtypedlistiter* pIterator ); */
result = xrtTypedListIterRBegin();

xrtTypedListIterFrom

XRT_API bool xrtTypedListIterFrom( xtypedlist* pList, int64 iKey, xtypedlistiter* pIterator );

;
返回:XRT_API bool xrtTypedListIterFrom( xtypedlist* pList, int64 iKey, xtypedlistiter* pIterator );

示例已编译验证

/* XRT_API bool xrtTypedListIterFrom( xtypedlist* pList, int64 iKey, xtypedlistiter* pIterator ); */
result = xrtTypedListIterFrom();

xrtTypedListIterRFrom

XRT_API bool xrtTypedListIterRFrom( xtypedlist* pList, int64 iKey, xtypedlistiter* pIterator );

;
返回:XRT_API bool xrtTypedListIterRFrom( xtypedlist* pList, int64 iKey, xtypedlistiter* pIterator );

示例已编译验证

/* XRT_API bool xrtTypedListIterRFrom( xtypedlist* pList, int64 iKey, xtypedlistiter* pIterator ); */
result = xrtTypedListIterRFrom();

xrtTypedListIterNext

XRT_API ptr xrtTypedListIterNext( xtypedlistiter* pIterator, int64* pKey );

;
返回:XRT_API ptr xrtTypedListIterNext( xtypedlistiter* pIterator, int64* pKey );

示例已编译验证

/* XRT_API ptr xrtTypedListIterNext( xtypedlistiter* pIterator, int64* pKey ); */
result = xrtTypedListIterNext();

xrtTypedListIterEnd

XRT_API void xrtTypedListIterEnd(xtypedlistiter* pIterator);

;
返回:XRT_API void xrtTypedListIterEnd(xtypedlistiter* pIterator);

示例已编译验证

/* XRT_API void xrtTypedListIterEnd(xtypedlistiter* pIterator); */
result = xrtTypedListIterEnd();

xrtTypedListTypeValidate

验证对象列表类型描述,并返回其共享实例操作表。

bool xrtTypedListTypeValidate(const xrttype* pType);
参数说明
const xrttype* pType类型
返回:验证对象列表类型描述,并返回其共享实例操作表。

示例已编译验证

/* 验证对象列表类型描述,并返回其共享实例操作表。 */
result = xrtTypedListTypeValidate(pType);

xrtTypedListInstanceOps

XRT_API const xrtinstanceops* xrtTypedListInstanceOps(void);

;
返回:XRT_API const xrtinstanceops* xrtTypedListInstanceOps(void);

示例已编译验证

/* XRT_API const xrtinstanceops* xrtTypedListInstanceOps(void); */
result = xrtTypedListInstanceOps();