As a MOC, the C ++ standard uses these language extensions (or other words that you prefer) Is expressly or clearly to use?
That is, can we make an analogous C ++ implementation with technically QT (including MOC)? MOC is a code generator, not a language extension. All code mock generates you can write with hand (although it can be time consuming, numb and error prone). Qt uses some macros such as Q_OBJECT, Q_SIGNALS, Q_SLOTS etc. to give declarations and moc to indicate. This is the "legal" use of the preprocessor. Only the thing that you can consider non-standard, running an MOC to generate additional code during the project creation is an additional step. Although it's a matter of build system (and code generation is not uncommon, see parsers, IPC interfaces, etc.) and outside of the scope of C ++.
Comments
Post a Comment