YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
Gerneral Algorithms

算法。 更多...

Gerneral Algorithms 的协作图:

模块

 POD Type Operations
 POD 类型操作。
 

函数

template<typename _tContainer >
void ystdex::erase_all (_tContainer &c, const typename _tContainer::value_type &val)
 删除指定序列容器中和指定值的相等的元素。
 
template<typename _tContainer , typename _tIn , typename _tValue >
void ystdex::erase_all (_tContainer &c, _tIn first, _tIn last, const _tValue &value)
 删除指定容器中迭代器区间中和指定值的相等的元素。
 
template<typename _tRange , typename _fPredicate >
void ystdex::erase_all_if (_tRange &c, _fPredicate pred)
 删除指定序列范围(包含序列容器及内建数组等)中满足条件的元素。
 
template<typename _tContainer , typename _tIn , typename _fPredicate >
void ystdex::erase_all_if (_tContainer &c, _tIn first, _tIn last, _fPredicate pred)
 删除指定容器中迭代器区间中满足条件的元素。
 
template<class _tMap >
std::pair< typename
_tMap::iterator, bool > 
ystdex::search_map (_tMap &m, const typename _tMap::key_type &k)
 按指定键值搜索指定映射。
 
template<class _tContainer , typename... _tParams>
void ystdex::assign (_tContainer &con, _tParams &&...args)
 插入参数指定的元素到容器。
 
template<class _tContainer , typename _type , size_t _vN>
void ystdex::assign (_tContainer &con, const _type(&arr)[_vN])
 

详细描述

算法。

字符串算法。

自从
build 189
build 304

函数说明

template<class _tContainer , typename... _tParams>
void ystdex::assign ( _tContainer &  con,
_tParams &&...  args 
)
inline

插入参数指定的元素到容器。

自从
build 274

在文件 container.hpp46 行定义.

参考 yforward.

template<class _tContainer , typename _type , size_t _vN>
void ystdex::assign ( _tContainer &  con,
const _type(&)  arr[_vN] 
)
inline

在文件 container.hpp52 行定义.

template<typename _tContainer >
void ystdex::erase_all ( _tContainer &  c,
const typename _tContainer::value_type &  val 
)

删除指定序列容器中和指定值的相等的元素。

注解
使用 ADL beginend 指定容器迭代器。
自从
build 289

在文件 container.hpp136 行定义.

参考 YSLib::begin() , 以及 YSLib::end().

参考自 YSLib::UI::MUIContainer::operator-=().

函数调用图:

这是这个函数的调用关系图:

template<typename _tContainer , typename _tIn , typename _tValue >
void ystdex::erase_all ( _tContainer &  c,
_tIn  first,
_tIn  last,
const _tValue &  value 
)

删除指定容器中迭代器区间中和指定值的相等的元素。

前置条件
first 和 last 是 c 的有效的迭代器或 c.end()
自从
build 289

在文件 container.hpp148 行定义.

参考 ystdex::iterator_transformation::first().

函数调用图:

template<typename _tRange , typename _fPredicate >
void ystdex::erase_all_if ( _tRange &  c,
_fPredicate  pred 
)

删除指定序列范围(包含序列容器及内建数组等)中满足条件的元素。

注解
使用 ADL beginend 指定范围迭代器。
自从
build 289

在文件 container.hpp165 行定义.

参考 YSLib::begin() , 以及 YSLib::end().

参考自 ShlTextReader::LoadFile().

函数调用图:

这是这个函数的调用关系图:

template<typename _tContainer , typename _tIn , typename _fPredicate >
void ystdex::erase_all_if ( _tContainer &  c,
_tIn  first,
_tIn  last,
_fPredicate  pred 
)

删除指定容器中迭代器区间中满足条件的元素。

前置条件
first 和 last 是 c 的有效的迭代器或 c.end()
自从
build 289

在文件 container.hpp177 行定义.

参考 ystdex::iterator_transformation::first().

函数调用图:

template<class _tMap >
std::pair<typename _tMap::iterator, bool> ystdex::search_map ( _tMap &  m,
const typename _tMap::key_type &  k 
)

按指定键值搜索指定映射。

返回
一个用于表示结果的 std::pair 对象,其成员 first 为迭代器, second 表示是否不存在而需要插入。
注解
行为类似 std::map::operator[] 。
自从
build 173

在文件 container.hpp197 行定义.

参考自 GetEvent().

这是这个函数的调用关系图: