class is defined using Macro. Not sure what is the significance of MACRO DEBUG_API here. [I understand #define is used to turn on or off some specific set of code.] But b
When defining this macro, you can choose attributes that will be applied to the class. These can be standard or compiler-specific attributes.
Your particular example is most probably an instance of the usual pattern for DLL headers under MSVC. Depending on a compile-time switch, DEBUG_API
will be set to either :
__declspec(dllexport)
, which will make MSVC generate a .lib file containing the class' thunk; this is used when compiling the library as a DLL;__declspec(dllimport)
, which will make MSVC link against the thunk generated above; this is used when linking with the DLL;