e32def.h 宏定义

来源:互联网 发布:剑三捏脸数据魔道祖师 编辑:程序博客网 时间:2024/05/29 15:42

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

原创粉丝点击