gcc中使用uuidof
来源:互联网 发布:淘宝被限制交易怎么办 编辑:程序博客网 时间:2024/05/18 01:16
前面转了一篇文章仿vc的uuidof: http://blog.csdn.net/zzw_happy/archive/2006/05/22/749407.aspx
现在发现了一个针对gcc的,使用了gcc的typeof:
template< class T>
struct hold_uuidof
...{
static GUID __IID ;
};
/**//*
this is a nice one. In MSVC++ u can do:
__uuidof(Foo) __uuidof(pointer2Foo) __uuidof(refranceofFoo)
and __uuidof(classAFoo). The GCC typeof() will take care of that
(get it: use one's extension to implement another)
*/
#define __uuidof( Q ) hold_uuidof< typeof(Q) >::__IID
/**//*
use this macro to assosiate a guid to a class/struct.
*/
#define MAKE_UUIDOF_ID( class ,IID )
template<>
GUID hold_uuidof<class>::__IID = IID;
/**//*
This one is the same as above but:
presupposes an IID_Interface was already defined
*/
#define MAKE_UUIDOF( class )
MAKE_UUIDOF_ID(class, IID_##class)
struct hold_uuidof
...{
static GUID __IID ;
};
/**//*
this is a nice one. In MSVC++ u can do:
__uuidof(Foo) __uuidof(pointer2Foo) __uuidof(refranceofFoo)
and __uuidof(classAFoo). The GCC typeof() will take care of that
(get it: use one's extension to implement another)
*/
#define __uuidof( Q ) hold_uuidof< typeof(Q) >::__IID
/**//*
use this macro to assosiate a guid to a class/struct.
*/
#define MAKE_UUIDOF_ID( class ,IID )
template<>
GUID hold_uuidof<class>::__IID = IID;
/**//*
This one is the same as above but:
presupposes an IID_Interface was already defined
*/
#define MAKE_UUIDOF( class )
MAKE_UUIDOF_ID(class, IID_##class)
- gcc中使用uuidof
- GCC中使用SIMD
- GCC中使用hash_map
- GCC中使用itoa()
- cygwin中如何使用gcc
- AVR-GCC 中如何使用volatile 关键字
- 在BREW项目中使用GCC编译器
- Gcc中使用profile工具优化代码
- GCC中使用预编译头文件
- configure中arm-linux-gcc编译器使用
- 在Keil中使用GCC工具链
- Gcc中使用profile工具优化代码
- makefile中使用gcc的问题
- gcc编译中使用的编译选项
- linux中gcc工具使用笔记
- gcc 中 assert(断言)的使用
- GCC中使用预编译头文件
- 使用GCC
- 文件选择器
- Asp.net中Frameset的使用小结
- 通过代理服务器连接
- 3000万收购trufun?
- 请谨慎实现operator==操作符函数
- gcc中使用uuidof
- swing 一句话经验
- 挑战Acegi1.0,小试牛刀,一小例(参考springside的acegi的相关文档)
- JS技巧大全
- 李翊老师、郑萌老师 简介
- 一个获取鼠标键盘动作的类 感谢hbxtlhx
- 扩展按钮
- 线程安全性
- 如何在oracle 加个自动增加的字段(指的是字段值)