What is this macro for at the beginning of a class definition?

前端 未结 3 809
無奈伤痛
無奈伤痛 2021-01-14 05:35

I\'m looking through the source of a library and many classes are defined using the following form

class THING_API ClassName 
{
...

Jumping

3条回答
  •  暖寄归人
    2021-01-14 06:32

    Empty macros like that are often used so that other parsers can gather information from the headers.

    Apple has the empty IBOutlet macro which the Interface Builder uses to allow you to connect variables to UI items in its GUI, and I think Qt uses the technique for their "moc" precompiler.

提交回复
热议问题