Symbian
Symbian OS Library

FAQ-0441 What do GLDEF_C, LOCAL_C, GLREF_C, etc. mean?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Base
Created: 11/29/99 Modified: 09/11/2002
Number: FAQ-0441
Platform: Not Applicable

Question:
What do GLDEF_C, LOCAL_C, GLREF_C, etc. mean?

Answer:
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 variables which have been declared as GLREF_C or GLREF_D respectively elsewhere.