/**************************************************************************/ /* marshalls.cpp */ /**************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /**************************************************************************/ /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ // THIS FILE IS GENERATED. EDITS WILL BE LOST. #include #include #include #include namespace godot { Marshalls *Marshalls::singleton = nullptr; Marshalls *Marshalls::get_singleton() { if (unlikely(singleton == nullptr)) { GDExtensionObjectPtr singleton_obj = ::godot::gdextension_interface::global_get_singleton(Marshalls::get_class_static()._native_ptr()); #ifdef DEBUG_ENABLED ERR_FAIL_NULL_V(singleton_obj, nullptr); #endif // DEBUG_ENABLED singleton = reinterpret_cast(::godot::gdextension_interface::object_get_instance_binding(singleton_obj, ::godot::gdextension_interface::token, &Marshalls::_gde_binding_callbacks)); #ifdef DEBUG_ENABLED ERR_FAIL_NULL_V(singleton, nullptr); #endif // DEBUG_ENABLED if (likely(singleton)) { ClassDB::_register_engine_singleton(Marshalls::get_class_static(), singleton); } } return singleton; } Marshalls::~Marshalls() { if (singleton == this) { ClassDB::_unregister_engine_singleton(Marshalls::get_class_static()); singleton = nullptr; } } String Marshalls::variant_to_base64(const Variant &p_variant, bool p_full_objects) { static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Marshalls::get_class_static()._native_ptr(), StringName("variant_to_base64")._native_ptr(), 3876248563); CHECK_METHOD_BIND_RET(_gde_method_bind, (String())); int8_t p_full_objects_encoded; PtrToArg::encode(p_full_objects, &p_full_objects_encoded); return ::godot::internal::_call_native_mb_ret(_gde_method_bind, _owner, &p_variant, &p_full_objects_encoded); } Variant Marshalls::base64_to_variant(const String &p_base64_str, bool p_allow_objects) { static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Marshalls::get_class_static()._native_ptr(), StringName("base64_to_variant")._native_ptr(), 218087648); CHECK_METHOD_BIND_RET(_gde_method_bind, (Variant())); int8_t p_allow_objects_encoded; PtrToArg::encode(p_allow_objects, &p_allow_objects_encoded); return ::godot::internal::_call_native_mb_ret(_gde_method_bind, _owner, &p_base64_str, &p_allow_objects_encoded); } String Marshalls::raw_to_base64(const PackedByteArray &p_array) { static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Marshalls::get_class_static()._native_ptr(), StringName("raw_to_base64")._native_ptr(), 3999417757); CHECK_METHOD_BIND_RET(_gde_method_bind, (String())); return ::godot::internal::_call_native_mb_ret(_gde_method_bind, _owner, &p_array); } PackedByteArray Marshalls::base64_to_raw(const String &p_base64_str) { static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Marshalls::get_class_static()._native_ptr(), StringName("base64_to_raw")._native_ptr(), 659035735); CHECK_METHOD_BIND_RET(_gde_method_bind, (PackedByteArray())); return ::godot::internal::_call_native_mb_ret(_gde_method_bind, _owner, &p_base64_str); } String Marshalls::utf8_to_base64(const String &p_utf8_str) { static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Marshalls::get_class_static()._native_ptr(), StringName("utf8_to_base64")._native_ptr(), 1703090593); CHECK_METHOD_BIND_RET(_gde_method_bind, (String())); return ::godot::internal::_call_native_mb_ret(_gde_method_bind, _owner, &p_utf8_str); } String Marshalls::base64_to_utf8(const String &p_base64_str) { static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Marshalls::get_class_static()._native_ptr(), StringName("base64_to_utf8")._native_ptr(), 1703090593); CHECK_METHOD_BIND_RET(_gde_method_bind, (String())); return ::godot::internal::_call_native_mb_ret(_gde_method_bind, _owner, &p_base64_str); } } // namespace godot