mirror of
https://github.com/godotengine/godot.git
synced 2026-03-03 20:55:48 +00:00
Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe. * New syntax allows for type safe virtuals in native extensions. * New syntax permits extremely fast calling. Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`. These will require API rework on a separate PR as they work different than the rest of the functions. Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
This commit is contained in:
@@ -624,21 +624,15 @@ Vector<String> EditorExportPlugin::get_ios_project_static_libs() const {
|
||||
}
|
||||
|
||||
void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
|
||||
if (get_script_instance()) {
|
||||
get_script_instance()->call("_export_file", p_path, p_type, p_features);
|
||||
}
|
||||
GDVIRTUAL_CALL(_export_file, p_path, p_type, p_features);
|
||||
}
|
||||
|
||||
void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
|
||||
if (get_script_instance()) {
|
||||
get_script_instance()->call("_export_begin", p_features, p_debug, p_path, p_flags);
|
||||
}
|
||||
GDVIRTUAL_CALL(_export_begin, p_features, p_debug, p_path, p_flags);
|
||||
}
|
||||
|
||||
void EditorExportPlugin::_export_end_script() {
|
||||
if (get_script_instance()) {
|
||||
get_script_instance()->call("_export_end");
|
||||
}
|
||||
GDVIRTUAL_CALL(_export_end);
|
||||
}
|
||||
|
||||
void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {
|
||||
@@ -663,9 +657,9 @@ void EditorExportPlugin::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
|
||||
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_export_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "features")));
|
||||
BIND_VMETHOD(MethodInfo("_export_begin", PropertyInfo(Variant::PACKED_STRING_ARRAY, "features"), PropertyInfo(Variant::BOOL, "is_debug"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags")));
|
||||
BIND_VMETHOD(MethodInfo("_export_end"));
|
||||
GDVIRTUAL_BIND(_export_file, "path", "type", "features");
|
||||
GDVIRTUAL_BIND(_export_begin, "features", "is_debug", "path", "flags");
|
||||
GDVIRTUAL_BIND(_export_end);
|
||||
}
|
||||
|
||||
EditorExportPlugin::EditorExportPlugin() {
|
||||
|
||||
Reference in New Issue
Block a user