class
Bindgen::Processor::QtMetaObject
- Bindgen::Processor::QtMetaObject
- Bindgen::Processor::Base
- Reference
- Object
Overview
Meta-objects for Crystal subclasses of QObject classes (SPEC.md §Q.4):
the signals, slots and properties a Crystal class declares with the
signal, @[Qt::Slot] and qt_property macros of the QObject wrapper
class, which this processor adds from assets/qt_meta_object.cr.
Runs after virtual_override, whose C++ subclass of every class deriving
from QObject gets a bgMeta pointer to a BindgenQtMetaObject (see
assets/bindgen_qt_meta.hpp, which the glue must include), and
overrides of metaObject, qt_metacast and qt_metacall using it.
The Qt processor made those methods non-virtual for the wrappers. A
SET_META function, called by a post-hook of the constructors, sets the
pointer to the meta-object of the Crystal class, which its finished
macro built.
Defined in:
bindgen/processor/qt_meta_object.crConstant Summary
-
BUILTIN_CRYSTAL_TYPES =
["Int8", "Int16", "Int32", "Int64", "UInt8", "UInt16", "UInt32", "UInt64", "Float32", "Float64", "Bool", "Nil", "String", "Bytes", "Void"] of ::String -
The Crystal types
BindgenMeta.cpp_type_namemaps itself. -
CLASS_MARKER =
"########## CLASS ##########" -
Separates the code of the module from the code of the
QObjectclass inGLUE_PATH. -
CONVERTED_PREFIX =
"bg_qt_meta" -
Prefix of the conversion functions of a converted value type.
-
GLUE_PATH =
"/srv/crystaldoc.info/github-Papierkorb-bindgen-v0.16.2/src/bindgen/processor/../../../assets/qt_meta_object.cr" -
The Crystal code added, see
#add_glue. -
Log =
::Log.for(self) -
Meta-objects for Crystal subclasses of
QObjectclasses (SPEC.md §Q.4): the signals, slots and properties a Crystal class declares with thesignal,@[Qt::Slot]andqt_propertymacros of theQObjectwrapper class, which this processor adds fromassets/qt_meta_object.cr.Runs after
virtual_override, whose C++ subclass of every class deriving fromQObjectgets abgMetapointer to aBindgenQtMetaObject(seeassets/bindgen_qt_meta.hpp, which the glue must include), and overrides ofmetaObject,qt_metacastandqt_metacallusing it. TheQtprocessor made those methods non-virtual for the wrappers. ASET_METAfunction, called by a post-hook of the constructors, sets the pointer to the meta-object of the Crystal class, which itsfinishedmacro built. -
META_FIELD =
"bgMeta" -
Name of the field holding it in the C++ subclass.
-
META_TYPE =
"BindgenQtMetaObject" -
The C++ type of a meta-object, of
bindgen_qt_meta.hpp. -
QOBJECT =
"QObject" -
The class whose subclasses get meta-objects.
-
SET_META =
"SET_META" -
Name of the function setting the meta-object of an object.
Instance Method Summary
-
#process(graph : Graph::Container, doc : Parser::Document)
Runs the processor.
-
#visit_class(klass)
Visits a
Graph::Class.
Instance methods inherited from class Bindgen::Processor::Base
inherited_rules(class_name : String, & : TypeDatabase::TypeConfig -> TypeDatabase::KeepAlive) : TypeDatabase::KeepAlive
inherited_rules,
process(graph : Graph::Container, doc : Parser::Document)
process,
unmatched_patterns(klass : Graph::Class, rules : TypeDatabase::KeepAlive) : Array(Regex)
unmatched_patterns
Constructor methods inherited from class Bindgen::Processor::Base
new(config : Configuration, db : TypeDatabase)
new
Instance methods inherited from module Bindgen::Graph::Visitor
visit_alias(alias_name)
visit_alias,
visit_children(container : Container)
visit_children,
visit_class(klass)
visit_class,
visit_constant(constant)
visit_constant,
visit_enum(enumeration)
visit_enum,
visit_library(library)
visit_library,
visit_method(method)
visit_method,
visit_namespace(ns)
visit_namespace,
visit_node(node : Node)
visit_node,
visit_node?(node : Node)
visit_node?,
visit_platform_specific(specific)
visit_platform_specific,
visit_struct(structure)
visit_struct,
visit_union(structure)
visit_union
Instance Method Detail
Runs the processor. You may change graph as you see fit.
Visits a Graph::Class. The default implementation calls
#visit_children to visit all child nodes.