FAQ
轻松一下?

AppleStar

Symbian中的GLDEF_C, LOCAL_C, GLREF_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)。这两个宏没有给出一个固定的定义,但是它们被作为函数和变量的记号。


提交评论


安全码
刷新