| 1 |
/**************************************************************************/ |
| 2 |
/* file_access.compat.inc */ |
| 3 |
/**************************************************************************/ |
| 4 |
/* This file is part of: */ |
| 5 |
/* GODOT ENGINE */ |
| 6 |
/* https://godotengine.org */ |
| 7 |
/**************************************************************************/ |
| 8 |
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ |
| 9 |
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ |
| 10 |
/* */ |
| 11 |
/* Permission is hereby granted, free of charge, to any person obtaining */ |
| 12 |
/* a copy of this software and associated documentation files (the */ |
| 13 |
/* "Software"), to deal in the Software without restriction, including */ |
| 14 |
/* without limitation the rights to use, copy, modify, merge, publish, */ |
| 15 |
/* distribute, sublicense, and/or sell copies of the Software, and to */ |
| 16 |
/* permit persons to whom the Software is furnished to do so, subject to */ |
| 17 |
/* the following conditions: */ |
| 18 |
/* */ |
| 19 |
/* The above copyright notice and this permission notice shall be */ |
| 20 |
/* included in all copies or substantial portions of the Software. */ |
| 21 |
/* */ |
| 22 |
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ |
| 23 |
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ |
| 24 |
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ |
| 25 |
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ |
| 26 |
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ |
| 27 |
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ |
| 28 |
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
| 29 |
/**************************************************************************/ |
| 30 |
|
| 31 |
#ifndef DISABLE_DEPRECATED |
| 32 |
|
| 33 |
Ref<FileAccess> FileAccess::_open_encrypted_bind_compat_98918(const String &p_path, ModeFlags p_mode_flags, const Vector<uint8_t> &p_key) { |
| 34 |
return open_encrypted(p_path, p_mode_flags, p_key, Vector<uint8_t>()); |
| 35 |
} |
| 36 |
|
| 37 |
Ref<FileAccess> FileAccess::_create_temp_compat_114053(int p_mode_flags, const String &p_prefix, const String &p_extension, bool p_keep) { |
| 38 |
return _create_temp((ModeFlags)p_mode_flags, p_prefix, p_extension, p_keep); |
| 39 |
} |
| 40 |
|
| 41 |
void FileAccess::store_8_bind_compat_78289(uint8_t p_dest) { |
| 42 |
store_8(p_dest); |
| 43 |
} |
| 44 |
|
| 45 |
void FileAccess::store_16_bind_compat_78289(uint16_t p_dest) { |
| 46 |
store_16(p_dest); |
| 47 |
} |
| 48 |
|
| 49 |
void FileAccess::store_32_bind_compat_78289(uint32_t p_dest) { |
| 50 |
store_32(p_dest); |
| 51 |
} |
| 52 |
|
| 53 |
void FileAccess::store_64_bind_compat_78289(uint64_t p_dest) { |
| 54 |
store_64(p_dest); |
| 55 |
} |
| 56 |
|
| 57 |
void FileAccess::store_buffer_bind_compat_78289(const Vector<uint8_t> &p_buffer) { |
| 58 |
store_buffer(p_buffer); |
| 59 |
} |
| 60 |
|
| 61 |
void FileAccess::store_var_bind_compat_78289(const Variant &p_var, bool p_full_objects) { |
| 62 |
store_var(p_var, p_full_objects); |
| 63 |
} |
| 64 |
|
| 65 |
void FileAccess::store_half_bind_compat_78289(float p_dest) { |
| 66 |
store_half(p_dest); |
| 67 |
} |
| 68 |
|
| 69 |
void FileAccess::store_float_bind_compat_78289(float p_dest) { |
| 70 |
store_float(p_dest); |
| 71 |
} |
| 72 |
|
| 73 |
void FileAccess::store_double_bind_compat_78289(double p_dest) { |
| 74 |
store_double(p_dest); |
| 75 |
} |
| 76 |
|
| 77 |
void FileAccess::store_real_bind_compat_78289(real_t p_real) { |
| 78 |
store_real(p_real); |
| 79 |
} |
| 80 |
|
| 81 |
void FileAccess::store_string_bind_compat_78289(const String &p_string) { |
| 82 |
store_string(p_string); |
| 83 |
} |
| 84 |
|
| 85 |
void FileAccess::store_line_bind_compat_78289(const String &p_line) { |
| 86 |
store_line(p_line); |
| 87 |
} |
| 88 |
|
| 89 |
void FileAccess::store_csv_line_bind_compat_78289(const Vector<String> &p_values, const String &p_delim) { |
| 90 |
store_csv_line(p_values, p_delim); |
| 91 |
} |
| 92 |
|
| 93 |
void FileAccess::store_pascal_string_bind_compat_78289(const String &p_string) { |
| 94 |
store_pascal_string(p_string); |
| 95 |
} |
| 96 |
|
| 97 |
String FileAccess::get_as_text_bind_compat_110867(bool p_skip_cr) const { |
| 98 |
String text = get_as_text(); |
| 99 |
if (unlikely(p_skip_cr)) { |
| 100 |
text = text.remove_char('\r'); |
| 101 |
} |
| 102 |
return text; |
| 103 |
} |
| 104 |
|
| 105 |
void FileAccess::_bind_compatibility_methods() { |
| 106 |
ClassDB::bind_compatibility_static_method("FileAccess", D_METHOD("open_encrypted", "path", "mode_flags", "key"), &FileAccess::_open_encrypted_bind_compat_98918); |
| 107 |
ClassDB::bind_compatibility_static_method("FileAccess", D_METHOD("create_temp", "mode_flags", "prefix", "extension", "keep"), &FileAccess::_create_temp_compat_114053, DEFVAL(""), DEFVAL(""), DEFVAL(false)); |
| 108 |
|
| 109 |
ClassDB::bind_compatibility_method(D_METHOD("store_8", "value"), &FileAccess::store_8_bind_compat_78289); |
| 110 |
ClassDB::bind_compatibility_method(D_METHOD("store_16", "value"), &FileAccess::store_16_bind_compat_78289); |
| 111 |
ClassDB::bind_compatibility_method(D_METHOD("store_32", "value"), &FileAccess::store_32_bind_compat_78289); |
| 112 |
ClassDB::bind_compatibility_method(D_METHOD("store_64", "value"), &FileAccess::store_64_bind_compat_78289); |
| 113 |
ClassDB::bind_compatibility_method(D_METHOD("store_half", "value"), &FileAccess::store_half_bind_compat_78289); |
| 114 |
ClassDB::bind_compatibility_method(D_METHOD("store_float", "value"), &FileAccess::store_float_bind_compat_78289); |
| 115 |
ClassDB::bind_compatibility_method(D_METHOD("store_double", "value"), &FileAccess::store_double_bind_compat_78289); |
| 116 |
ClassDB::bind_compatibility_method(D_METHOD("store_real", "value"), &FileAccess::store_real_bind_compat_78289); |
| 117 |
ClassDB::bind_compatibility_method(D_METHOD("store_buffer", "buffer"), &FileAccess::store_buffer_bind_compat_78289); |
| 118 |
ClassDB::bind_compatibility_method(D_METHOD("store_line", "line"), &FileAccess::store_line_bind_compat_78289); |
| 119 |
ClassDB::bind_compatibility_method(D_METHOD("store_csv_line", "values", "delim"), &FileAccess::store_csv_line_bind_compat_78289, DEFVAL(",")); |
| 120 |
ClassDB::bind_compatibility_method(D_METHOD("store_string", "string"), &FileAccess::store_string_bind_compat_78289); |
| 121 |
ClassDB::bind_compatibility_method(D_METHOD("store_var", "value", "full_objects"), &FileAccess::store_var_bind_compat_78289, DEFVAL(false)); |
| 122 |
ClassDB::bind_compatibility_method(D_METHOD("store_pascal_string", "string"), &FileAccess::store_pascal_string_bind_compat_78289); |
| 123 |
ClassDB::bind_compatibility_method(D_METHOD("get_as_text", "skip_cr"), &FileAccess::get_as_text_bind_compat_110867, DEFVAL(false)); |
| 124 |
} |
| 125 |
|
| 126 |
#endif |