Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Meta-object System

From Wikipedia, the free encyclopedia
Main article:Qt (software)

Meta Object System is a part ofQt framework core provided to support Qt extensions toC++ likesignals/slots for inter-object communication, run-timetype information, and the dynamic property system.[1]

Architecture

[edit]

The Meta object system consists of 3 things: QObjectclass, Q_OBJECTmacro and a tool called moc (Meta-ObjectCompiler). QObject is the base class for all Qt classes, Q_OBJECT macro is used to enable meta-object features in classes and finally moc is apreprocessor that changes Q_OBJECT macro instances toC++source code to enable meta object system mechanism in the class in which it is used.[2]

Using the meta object system has brought some criticism. InQt documentation, several reasons have been given for the use of the meta object system, including benefits ofcode generation, dynamism ofGUIs, automatic binding to scripting languages, not adding limitations and also reasonable performance in signal/slot implementation with moc.[3] There are some efforts to make Qt needless of a preprocessor. These efforts include re-implementing Qt moc using libclang.[4]

References

[edit]
  1. ^"The Meta-Object System - QtCore 5.1". Qt Project. 2013-07-04. Archived fromthe original on 2013-08-26. Retrieved2013-07-04.
  2. ^"Using the Meta-Object Compiler (moc)". Qt Project. 2013-07-04. Archived fromthe original on 2013-08-26. Retrieved2013-07-04.
  3. ^"Why Does Qt Use Moc for Signals and Slots?". Qt Project. 2013-07-04. Archived fromthe original on 2013-10-20. Retrieved2013-07-04.
  4. ^"Re-implementing Qt moc using libclang". Olivier Goffart. 2013-07-04. Retrieved2013-07-04.
GUIs built with Qt
Qt technologies
Tools
Language bindings
Supported platforms
Related topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Meta-object_System&oldid=1317282192"
Category:

[8]ページ先頭

©2009-2026 Movatter.jp