TpVector 类
V0.2.1TpUtils
2025-11-14
基础信息
| 头文件: | include <TpVector.h> |
|---|---|
| Cmake: | None |
| 发布版本: | V0.2.1 |
| 继承类: | |
| 派生类: |
Public 成员函数
| TpVector()=default | ||
|---|---|---|
| TpVector(std::initializer_list< T > initList) | ||
| TpVector(const TpVector &other) | ||
| TpVector(TpVector &&other) noexcept | ||
| TpVector & TpVector< T >::operator= | operator=(const TpVector &other) | |
| TpVector & TpVector< T >::operator= | operator=(TpVector &&other) noexcept | |
| contains(const T &value) | 获取容器内是否存在某个值 | |
| remove(uint32_t i) | 移除指定索引的值 | |
| insertData(uint32_t i, const T &value) | 在指定索引处插入值 | |
| isEmpty() const | 容器是否为空 | |
| append(const T &value) | 添加单个元素到向量末尾 | |
| append(std::initializer_list< T > list) | 添加多个元素到向量末尾 | |
| append(const TpVector< T > &other) | 添加另一个向量的所有元素到当前向量末尾 |
成员函数说明
TpVector< T >::TpVector()=default
暂无注释...
TpVector< T >::TpVector(std::initializer_list< T > initList)
暂无注释...
TpVector< T >::TpVector(const TpVector &other)
暂无注释...
TpVector< T >::TpVector(TpVector &&other) noexcept
暂无注释...
TpVector & TpVector< T >::operator=(const TpVector &other)
暂无注释...
TpVector & TpVector< T >::operator=(TpVector &&other) noexcept
暂无注释...
bool TpVector< T >::contains(const T &value)
获取容器内是否存在某个值...
获取容器内是否存在某个值
参数:value: 值
返回值:存在返回true,否则返回false
void TpVector< T >::remove(uint32_t i)
移除指定索引的值...
移除指定索引的值
参数:i: 索引
void TpVector< T >::insertData(uint32_t i, const T &value)
在指定索引处插入值...
在指定索引处插入值
参数:i: 索引
参数:value: 插入值
bool TpVector< T >::isEmpty() const
容器是否为空...
容器是否为空
返回值:为空返回true,否则返回false
void TpVector< T >::append(const T &value)
添加单个元素到向量末尾...
添加单个元素到向量末尾
参数:value: 要添加的元素
void TpVector< T >::append(std::initializer_list< T > list)
添加多个元素到向量末尾...
添加多个元素到向量末尾
参数:list: 初始化列表
void TpVector< T >::append(const TpVector< T > &other)
添加另一个向量的所有元素到当前向量末尾...
添加另一个向量的所有元素到当前向量末尾
参数:other: 另一个向量
