What does it mean when a class declaration appears to have two names?

后端 未结 3 827
渐次进展
渐次进展 2021-02-05 17:49

I\'m trying to understand some C++ code which has the following class syntax:

class Q_MONKEY_EXPORT BasePlugin : public QObject
{
    // some code comes here
};
         


        
3条回答
  •  离开以前
    2021-02-05 18:43

    Q_MONKEY_EXPORT is a macro (all upper case is convention for macro) that typically resolves to something like __declspec(dllexport) when you are building the DLL and resolves to __declspec(dllimport) when you are using the DLL.

    You can find out exactly what it is by reading your include files.

提交回复
热议问题