xrtTypedSetInit

初始化、创建、结束或销毁一个拥有类型值的空集合。

bool xrtTypedSetInit( xtypedset* pSet, const xrttype* pItemType );
参数说明
xtypedset* pSet集合对象
const xrttype* pItemTypeItemTye 参数
返回:初始化、创建、结束或销毁一个拥有类型值的空集合。

示例已编译验证

typedsetinit obj;
xrtTypedSetInit(&obj, pSet, pItemType);

xrtTypedSetCreate

XRT_API xtypedset* xrtTypedSetCreate(const xrttype* pItemType);

;
返回:XRT_API xtypedset* xrtTypedSetCreate(const xrttype* pItemType);

示例已编译验证

/* XRT_API xtypedset* xrtTypedSetCreate(const xrttype* pItemType); */
xhandle* h = xrtTypedSetCreate();

xrtTypedSetUnit

XRT_API void xrtTypedSetUnit(xtypedset* pSet);

;
返回:XRT_API void xrtTypedSetUnit(xtypedset* pSet);

示例已编译验证

xrtTypedSetUnit(obj);

xrtTypedSetDestroy

XRT_API void xrtTypedSetDestroy(xtypedset* pSet);

;
返回:XRT_API void xrtTypedSetDestroy(xtypedset* pSet);

示例已编译验证

xrtTypedSetDestroy(obj);

xrtTypedSetItemType

返回借用元素类型、当前元素数和再次扩容前的容量。

const xrttype* xrtTypedSetItemType(const xtypedset* pSet);
参数说明
const xtypedset* pSet集合对象
返回:返回借用元素类型、当前元素数和再次扩容前的容量。

示例已编译验证

/* 返回借用元素类型、当前元素数和再次扩容前的容量。 */
result = xrtTypedSetItemType(pSet);

xrtTypedSetCount

XRT_API size_t xrtTypedSetCount(const xtypedset* pSet);

;
返回:XRT_API size_t xrtTypedSetCount(const xtypedset* pSet);

示例已编译验证

/* XRT_API size_t xrtTypedSetCount(const xtypedset* pSet); */
result = xrtTypedSetCount();

xrtTypedSetCapacity

XRT_API size_t xrtTypedSetCapacity(const xtypedset* pSet);

;
返回:XRT_API size_t xrtTypedSetCapacity(const xtypedset* pSet);

示例已编译验证

/* XRT_API size_t xrtTypedSetCapacity(const xtypedset* pSet); */
result = xrtTypedSetCapacity();

xrtTypedSetClear

清空、预留或裁剪集合存储。

bool xrtTypedSetClear(xtypedset* pSet);
参数说明
xtypedset* pSet集合对象
返回:清空、预留或裁剪集合存储。

示例已编译验证

/* 清空、预留或裁剪集合存储。 */
result = xrtTypedSetClear(pSet);

xrtTypedSetReserve

XRT_API bool xrtTypedSetReserve(xtypedset* pSet, size_t iCapacity);

;
返回:XRT_API bool xrtTypedSetReserve(xtypedset* pSet, size_t iCapacity);

示例已编译验证

/* XRT_API bool xrtTypedSetReserve(xtypedset* pSet, size_t iCapacity); */
result = xrtTypedSetReserve();

xrtTypedSetTrim

XRT_API bool xrtTypedSetTrim(xtypedset* pSet);

;
返回:XRT_API bool xrtTypedSetTrim(xtypedset* pSet);

示例已编译验证

/* XRT_API bool xrtTypedSetTrim(xtypedset* pSet); */
result = xrtTypedSetTrim();

xrtTypedSetGetOrAdd

返回已有或失败原子地复制加入的只读规范值。

const void* xrtTypedSetGetOrAdd( xtypedset* pSet, const void* pItem, bool* pNew );
参数说明
xtypedset* pSet集合对象
const void* pItem元素
bool* pNewNew 参数
返回:返回已有或失败原子地复制加入的只读规范值。

示例已编译验证

/* 返回已有或失败原子地复制加入的只读规范值。 */
result = xrtTypedSetGetOrAdd(pSet, pItem, pNew);

xrtTypedSetAdd

XRT_API bool xrtTypedSetAdd(xtypedset* pSet, const void* pItem);

;
返回:XRT_API bool xrtTypedSetAdd(xtypedset* pSet, const void* pItem);

示例已编译验证

/* XRT_API bool xrtTypedSetAdd(xtypedset* pSet, const void* pItem); */
result = xrtTypedSetAdd();

xrtTypedSetGet

返回或判断等价规范值;缺失是正常结果。

const void* xrtTypedSetGet( const xtypedset* pSet, const void* pItem );
参数说明
const xtypedset* pSet集合对象
const void* pItem元素
返回:返回或判断等价规范值;缺失是正常结果。

示例已编译验证

/* 返回或判断等价规范值;缺失是正常结果。 */
result = xrtTypedSetGet(pSet, pItem);

xrtTypedSetHas

XRT_API bool xrtTypedSetHas( const xtypedset* pSet, const void* pItem );

;
返回:XRT_API bool xrtTypedSetHas( const xtypedset* pSet, const void* pItem );

示例已编译验证

/* XRT_API bool xrtTypedSetHas( const xtypedset* pSet, const void* pItem ); */
result = xrtTypedSetHas();

xrtTypedSetRemove

删除等价值,或把规范值移动到外部已初始化输出后删除。

bool xrtTypedSetRemove(xtypedset* pSet, const void* pItem);
参数说明
xtypedset* pSet集合对象
const void* pItem元素
返回:删除等价值,或把规范值移动到外部已初始化输出后删除。

示例已编译验证

/* 删除等价值,或把规范值移动到外部已初始化输出后删除。 */
result = xrtTypedSetRemove(pSet, pItem);

xrtTypedSetTake

XRT_API bool xrtTypedSetTake( xtypedset* pSet, const void* pItem, ptr pValue );

;
返回:XRT_API bool xrtTypedSetTake( xtypedset* pSet, const void* pItem, ptr pValue );

示例已编译验证

/* XRT_API bool xrtTypedSetTake( xtypedset* pSet, const void* pItem, ptr pValue ); */
result = xrtTypedSetTake();

xrtTypedSetAt

按插入顺序返回指定位置的只读规范值,复杂度为 O(n)。

const void* xrtTypedSetAt( const xtypedset* pSet, size_t iIndex );
参数说明
const xtypedset* pSet集合对象
size_t iIndex下标
返回:按插入顺序返回指定位置的只读规范值,复杂度为 O(n)。

示例已编译验证

/* 按插入顺序返回指定位置的只读规范值,复杂度为 O(n)。 */
result = xrtTypedSetAt(pSet, iIndex);

xrtTypedSetIterBegin

启动按插入顺序或逆序的外置迭代。

bool xrtTypedSetIterBegin( xtypedset* pSet, xtypedsetiter* pIterator );
参数说明
xtypedset* pSet集合对象
xtypedsetiter* pIterator迭代器
返回:启动按插入顺序或逆序的外置迭代。

示例已编译验证

/* 启动按插入顺序或逆序的外置迭代。 */
result = xrtTypedSetIterBegin(pSet, pIterator);

xrtTypedSetIterRBegin

XRT_API bool xrtTypedSetIterRBegin( xtypedset* pSet, xtypedsetiter* pIterator );

;
返回:XRT_API bool xrtTypedSetIterRBegin( xtypedset* pSet, xtypedsetiter* pIterator );

示例已编译验证

/* XRT_API bool xrtTypedSetIterRBegin( xtypedset* pSet, xtypedsetiter* pIterator ); */
result = xrtTypedSetIterRBegin();

xrtTypedSetIterNext

XRT_API const void* xrtTypedSetIterNext(xtypedsetiter* pIterator);

;
返回:XRT_API const void* xrtTypedSetIterNext(xtypedsetiter* pIterator);

示例已编译验证

/* XRT_API const void* xrtTypedSetIterNext(xtypedsetiter* pIterator); */
result = xrtTypedSetIterNext();

xrtTypedSetIterEnd

XRT_API void xrtTypedSetIterEnd(xtypedsetiter* pIterator);

;
返回:XRT_API void xrtTypedSetIterEnd(xtypedsetiter* pIterator);

示例已编译验证

/* XRT_API void xrtTypedSetIterEnd(xtypedsetiter* pIterator); */
result = xrtTypedSetIterEnd();

xrtTypedSetMerge

事务合并同类型集合,并深复制创建独立集合。

bool xrtTypedSetMerge( xtypedset* pTarget, const xtypedset* pSource );
参数说明
xtypedset* pTarget目标
const xtypedset* pSource来源
返回:事务合并同类型集合,并深复制创建独立集合。

示例已编译验证

/* 事务合并同类型集合,并深复制创建独立集合。 */
result = xrtTypedSetMerge(pTarget, pSource);

xrtTypedSetClone

XRT_API xtypedset* xrtTypedSetClone(const xtypedset* pSet);

;
返回:XRT_API xtypedset* xrtTypedSetClone(const xtypedset* pSet);

示例已编译验证

/* XRT_API xtypedset* xrtTypedSetClone(const xtypedset* pSet); */
result = xrtTypedSetClone();

xrtTypedSetUnion

创建两个同类型集合的并、交、差或对称差。

xtypedset* xrtTypedSetUnion( const xtypedset* pLeft, const xtypedset* pRight );
参数说明
const xtypedset* pLeft左操作数
const xtypedset* pRight右操作数
返回:创建两个同类型集合的并、交、差或对称差。

示例已编译验证

/* 创建两个同类型集合的并、交、差或对称差。 */
result = xrtTypedSetUnion(pLeft, pRight);

xrtTypedSetIntersection

XRT_API xtypedset* xrtTypedSetIntersection( const xtypedset* pLeft, const xtypedset* pRight );

;
返回:XRT_API xtypedset* xrtTypedSetIntersection( const xtypedset* pLeft, const xtypedset* pRight );

示例已编译验证

/* XRT_API xtypedset* xrtTypedSetIntersection( const xtypedset* pLeft, const xtypedset* pRight ); */
result = xrtTypedSetIntersection();

xrtTypedSetDifference

XRT_API xtypedset* xrtTypedSetDifference( const xtypedset* pLeft, const xtypedset* pRight );

;
返回:XRT_API xtypedset* xrtTypedSetDifference( const xtypedset* pLeft, const xtypedset* pRight );

示例已编译验证

/* XRT_API xtypedset* xrtTypedSetDifference( const xtypedset* pLeft, const xtypedset* pRight ); */
result = xrtTypedSetDifference();

xrtTypedSetSymmetricDifference

XRT_API xtypedset* xrtTypedSetSymmetricDifference( const xtypedset* pLeft, const xtypedset* pRight );

;
返回:XRT_API xtypedset* xrtTypedSetSymmetricDifference( const xtypedset* pLeft, const xtypedset* pRight );

示例已编译验证

/* XRT_API xtypedset* xrtTypedSetSymmetricDifference( const xtypedset* pLeft, const xtypedset* pRight ); */
result = xrtTypedSetSymmetricDifference();

xrtTypedSetIsSubset

判断同类型集合的包含、相离或相等关系。

bool xrtTypedSetIsSubset( const xtypedset* pLeft, const xtypedset* pRight, bool bProper );
参数说明
const xtypedset* pLeft左操作数
const xtypedset* pRight右操作数
bool bProper严格子集
返回:判断同类型集合的包含、相离或相等关系。

示例已编译验证

/* 判断同类型集合的包含、相离或相等关系。 */
result = xrtTypedSetIsSubset(pLeft, pRight, bProper);

xrtTypedSetIsSuperset

XRT_API bool xrtTypedSetIsSuperset( const xtypedset* pLeft, const xtypedset* pRight, bool bProper );

;
返回:XRT_API bool xrtTypedSetIsSuperset( const xtypedset* pLeft, const xtypedset* pRight, bool bProper );

示例已编译验证

/* XRT_API bool xrtTypedSetIsSuperset( const xtypedset* pLeft, const xtypedset* pRight, bool bProper ); */
result = xrtTypedSetIsSuperset();

xrtTypedSetIsDisjoint

XRT_API bool xrtTypedSetIsDisjoint( const xtypedset* pLeft, const xtypedset* pRight );

;
返回:XRT_API bool xrtTypedSetIsDisjoint( const xtypedset* pLeft, const xtypedset* pRight );

示例已编译验证

/* XRT_API bool xrtTypedSetIsDisjoint( const xtypedset* pLeft, const xtypedset* pRight ); */
result = xrtTypedSetIsDisjoint();

xrtTypedSetEquals

XRT_API bool xrtTypedSetEquals( const xtypedset* pLeft, const xtypedset* pRight );

;
返回:XRT_API bool xrtTypedSetEquals( const xtypedset* pLeft, const xtypedset* pRight );

示例已编译验证

/* XRT_API bool xrtTypedSetEquals( const xtypedset* pLeft, const xtypedset* pRight ); */
result = xrtTypedSetEquals();

xrtTypedSetTypeValidate

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

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

示例已编译验证

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

xrtTypedSetInstanceOps

XRT_API const xrtinstanceops* xrtTypedSetInstanceOps(void);

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

示例已编译验证

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