宽窄接口分离的代码
来源:互联网 发布:c语言谭浩强课后答案 编辑:程序博客网 时间:2024/04/27 17:09
template<typename wide, typename narraw>
class wrap : public narraw
{
public:
virtual wide& toWide() = 0;
virtual const wide& toWide() const = 0;
protected:
~warp(){}
};
template<typename wide, typename narraw>
class rich : public wide, wrap<wide, narraw>
{
virtual wide& toWide() { return *this; }
virtual const wide& toWide() const { return *this; }
narraw& toNarraw() { return *this; }
const narraw& toNarraw() const { return *this; }
};
class wrap : public narraw
{
public:
virtual wide& toWide() = 0;
virtual const wide& toWide() const = 0;
protected:
~warp(){}
};
template<typename wide, typename narraw>
class rich : public wide, wrap<wide, narraw>
{
virtual wide& toWide() { return *this; }
virtual const wide& toWide() const { return *this; }
narraw& toNarraw() { return *this; }
const narraw& toNarraw() const { return *this; }
};
- 宽窄接口分离的代码
- 宽窄字符之间的转换
- 宽窄带信号的区别(作者:doctorstar)
- 拖动条seekbar调整条的宽窄
- 老外的代码分离办法
- 关于代码分离的思考
- 类的接口与实现的分离
- C++ 接口和对象分离的技术
- C++接口和对象分离的技术
- c++接口与实现的分离
- 代理类:接口与实现的分离
- <C++> 类的‘’实现‘’与‘’接口‘’分离
- 网络上搜集的宽窄转换,挺常用。备用
- 实习随手记-宽窄字符串之间的转换
- wchar、tchar、L等宽窄字符的含义与转换
- 关于页面和代码分离的
- Asp中代码与页面的分离
- 让代码与视图模板的分离
- 有趣的多线程编程(3)——线程内部是如何进行的?
- [引用]我发泄的办法,请勿轻易使用
- 假期的一点收获
- 有趣的多线程编程(4)——死锁
- 祝贺我的博客新开张!
- 宽窄接口分离的代码
- 已知的Google服务器阵列
- 数字视频监控系统
- 我眼中的GOOGLE产业
- 转行---每个IT人的梦想 (送给自己的2005)
- Power Logo快速入门
- 通过直通线连接使用Uplink口的解决之道
- 银行家算法C#示例
- 剪贴板延迟提交的实现