Symbian C++ 里的LOCAL_C/GLDEF_C含义....

Symbian C++ 里的LOCAL_C/GLDEF_C含义....

 

These are defined in e32def.h as follows:

#define GLREF_D extern
#define GLDEF_D
#define LOCAL_D static
#define GLREF_C extern
#define GLDEF_C
#define LOCAL_C static

The _C and _D suffixes are an EPOC convention. _D indicates a declaration (Data), _C indicates a definition (Code).

As static is an overloaded word in C++ (i.e. it's used to mean more than one thing), we use the more meaningful termsLOCAL_C and LOCAL_D instead.

GLREF_C and GLREF_D, by contrast, are used to indicated GLobal REFerences, i.e. extern.


Finally GLDEF_C and GLDEF_D indicate GLobal DEFinitions. These terms don't have a formal definition but are used as markers for functions or varia

这些宏被定义在 e32def.h 头文件中,如下:

#define GLREF_D extern
#define GLDEF_D
#define LOCAL_D static
#define GLREF_C extern
#define GLDEF_C
#define LOCAL_C static

后缀 _D 和 _C 是 EPOC 的的一个约定,_D 指数据声明(declaration of Data),_C 指代码定义(definition of Code)。

LOCAL_C 和 LOCAL_D ,被 static 所取代。
GLREF_C 和 GLREF_D 被指定为全局引用(GLobal REFerence):extern 。
GLDEF_C 和 GLDEF_D 指定了一个全局定义(GLobal DEFination)。这两个宏没有给出一个固定的定义,但是它们被作为函数和变量的记号。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值