templ 自用
来源:互联网 发布:coc蛮王升级数据表格 编辑:程序博客网 时间:2024/05/16 19:41
template <typename T>
class NameComparator
{
public:
inline bool operator()(const T* s1, const T* s2) const {
return s1->getName() < s2->getName();
}
};
class IdComparator
{
public:
inline bool operator()(const NetlistObj* s1, const NetlistObj* s2) const {
return s1->getId() < s2->getId();
}
};
template<typename K, typename T, typename Compare>
class HalfKeySet : public std::set<T*, Compare >
{
public:
// std::set<T*, Compare, std::allocator<T*> >::const_iterator;
typedef typename std::set<T*, Compare>::const_iterator const_iterator;
typedef typename std::set<T*, Compare >::iterator iterator;
typedef SetIterator<T*, Compare> GeneralIterator;
using std::set<T*, Compare >::find;
const_iterator find(const K& name) {
T key(name);
return std::set<T*, Compare >::find(&key);
}
};
class NameComparator
{
public:
inline bool operator()(const T* s1, const T* s2) const {
return s1->getName() < s2->getName();
}
};
class IdComparator
{
public:
inline bool operator()(const NetlistObj* s1, const NetlistObj* s2) const {
return s1->getId() < s2->getId();
}
};
template<typename K, typename T, typename Compare>
class HalfKeySet : public std::set<T*, Compare >
{
public:
// std::set<T*, Compare, std::allocator<T*> >::const_iterator;
typedef typename std::set<T*, Compare>::const_iterator const_iterator;
typedef typename std::set<T*, Compare >::iterator iterator;
typedef SetIterator<T*, Compare> GeneralIterator;
using std::set<T*, Compare >::find;
const_iterator find(const K& name) {
T key(name);
return std::set<T*, Compare >::find(&key);
}
};
0 0
- templ 自用
- 自用
- 自用
- 自用
- 自用
- 自用
- 自用
- 关于templ和html拼接比较
- Coping with a New Beta - Data Server Control Templ
- 自用参考
- 自用方案
- 自用常用软件
- 自用收藏
- 自用C++
- 自用工具箱
- grep自用
- 自用笔记
- Floyd(自用)
- iOS程序中添加字体
- php使用exec函数导入导出数据库
- 全排列生成算法(一)
- 运算符
- TDDL+DIAMOND的配置及使用(二):Diamond
- templ 自用
- android学习常用网站
- 谈谈你对SSH框架的理解——来自IBM的一道面试题
- Dijkstra算法
- java中的数据类型
- POJ 3250 Bad Hair Day
- 第一章百宝云基础语法新手教程第二节常用运算符
- 获取当前安装app列表
- ssm + ajax过程中遇到的问题