fix: 装备属性面板避让逻辑 + 多项功能更新

- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧
- inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域
- 包含其他累积的功能开发和测试文件
This commit is contained in:
shen
2026-09-21 16:38:59 -07:00
parent 1522a8a1a1
commit c93894313a
5498 changed files with 4558004 additions and 1442 deletions
@@ -0,0 +1,290 @@
/**************************************************************************/
/* array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <godot_cpp/variant/array_helpers.hpp>
#include <gdextension_interface.h>
namespace godot {
class Callable;
class Dictionary;
class PackedByteArray;
class PackedColorArray;
class PackedFloat32Array;
class PackedFloat64Array;
class PackedInt32Array;
class PackedInt64Array;
class PackedStringArray;
class PackedVector2Array;
class PackedVector3Array;
class PackedVector4Array;
class StringName;
class Variant;
class Array {
static constexpr size_t ARRAY_SIZE = 8;
alignas(8) uint8_t opaque[ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrConstructor constructor_3;
GDExtensionPtrConstructor constructor_4;
GDExtensionPtrConstructor constructor_5;
GDExtensionPtrConstructor constructor_6;
GDExtensionPtrConstructor constructor_7;
GDExtensionPtrConstructor constructor_8;
GDExtensionPtrConstructor constructor_9;
GDExtensionPtrConstructor constructor_10;
GDExtensionPtrConstructor constructor_11;
GDExtensionPtrConstructor constructor_12;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_hash;
GDExtensionPtrBuiltInMethod method_assign;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_push_front;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrBuiltInMethod method_front;
GDExtensionPtrBuiltInMethod method_back;
GDExtensionPtrBuiltInMethod method_pick_random;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_find_custom;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_rfind_custom;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_pop_back;
GDExtensionPtrBuiltInMethod method_pop_front;
GDExtensionPtrBuiltInMethod method_pop_at;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_sort_custom;
GDExtensionPtrBuiltInMethod method_shuffle;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_bsearch_custom;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_duplicate_deep;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_filter;
GDExtensionPtrBuiltInMethod method_map;
GDExtensionPtrBuiltInMethod method_reduce;
GDExtensionPtrBuiltInMethod method_any;
GDExtensionPtrBuiltInMethod method_all;
GDExtensionPtrBuiltInMethod method_max;
GDExtensionPtrBuiltInMethod method_min;
GDExtensionPtrBuiltInMethod method_is_typed;
GDExtensionPtrBuiltInMethod method_is_same_typed;
GDExtensionPtrBuiltInMethod method_get_typed_builtin;
GDExtensionPtrBuiltInMethod method_get_typed_class_name;
GDExtensionPtrBuiltInMethod method_get_typed_script;
GDExtensionPtrBuiltInMethod method_make_read_only;
GDExtensionPtrBuiltInMethod method_is_read_only;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_equal_Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_Array;
GDExtensionPtrOperatorEvaluator operator_less_Array;
GDExtensionPtrOperatorEvaluator operator_less_equal_Array;
GDExtensionPtrOperatorEvaluator operator_greater_Array;
GDExtensionPtrOperatorEvaluator operator_greater_equal_Array;
GDExtensionPtrOperatorEvaluator operator_add_Array;
GDExtensionPtrOperatorEvaluator operator_in_Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
Array(const Variant *p_variant);
const Variant *ptr() const;
Variant *ptrw();
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[ARRAY_SIZE]>(&opaque); }
Array();
Array(const Array &p_from);
Array(const Array &p_base, int64_t p_type, const StringName &p_class_name, const Variant &p_script);
Array(const PackedByteArray &p_from);
Array(const PackedInt32Array &p_from);
Array(const PackedInt64Array &p_from);
Array(const PackedFloat32Array &p_from);
Array(const PackedFloat64Array &p_from);
Array(const PackedStringArray &p_from);
Array(const PackedVector2Array &p_from);
Array(const PackedVector3Array &p_from);
Array(const PackedColorArray &p_from);
Array(const PackedVector4Array &p_from);
Array(Array &&p_other);
~Array();
int64_t size() const;
bool is_empty() const;
void clear();
int64_t hash() const;
void assign(const Array &p_array);
Variant get(int64_t p_index) const;
void set(int64_t p_index, const Variant &p_value);
void push_back(const Variant &p_value);
void push_front(const Variant &p_value);
void append(const Variant &p_value);
void append_array(const Array &p_array);
int64_t resize(int64_t p_size);
int64_t insert(int64_t p_position, const Variant &p_value);
void remove_at(int64_t p_position);
void fill(const Variant &p_value);
void erase(const Variant &p_value);
Variant front() const;
Variant back() const;
Variant pick_random() const;
int64_t find(const Variant &p_what, int64_t p_from = 0) const;
int64_t find_custom(const Callable &p_method, int64_t p_from = 0) const;
int64_t rfind(const Variant &p_what, int64_t p_from = -1) const;
int64_t rfind_custom(const Callable &p_method, int64_t p_from = -1) const;
int64_t count(const Variant &p_value) const;
bool has(const Variant &p_value) const;
Variant pop_back();
Variant pop_front();
Variant pop_at(int64_t p_position);
void sort();
void sort_custom(const Callable &p_func);
void shuffle();
int64_t bsearch(const Variant &p_value, bool p_before = true) const;
int64_t bsearch_custom(const Variant &p_value, const Callable &p_func, bool p_before = true) const;
void reverse();
Array duplicate(bool p_deep = false) const;
Array duplicate_deep(int64_t p_deep_subresources_mode = 1) const;
Array slice(int64_t p_begin, int64_t p_end = 2147483647, int64_t p_step = 1, bool p_deep = false) const;
Array filter(const Callable &p_method) const;
Array map(const Callable &p_method) const;
Variant reduce(const Callable &p_method, const Variant &p_accum) const;
bool any(const Callable &p_method) const;
bool all(const Callable &p_method) const;
Variant max() const;
Variant min() const;
bool is_typed() const;
bool is_same_typed(const Array &p_array) const;
int64_t get_typed_builtin() const;
StringName get_typed_class_name() const;
Variant get_typed_script() const;
void make_read_only();
bool is_read_only() const;
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const Array &p_other) const;
bool operator!=(const Array &p_other) const;
bool operator<(const Array &p_other) const;
bool operator<=(const Array &p_other) const;
bool operator>(const Array &p_other) const;
bool operator>=(const Array &p_other) const;
Array operator+(const Array &p_other) const;
Array &operator=(const Array &p_other);
Array &operator=(Array &&p_other);
template <typename... Args>
static Array make(Args... p_args) {
return helpers::append_all(Array(), p_args...);
}
const Variant &operator[](int64_t p_index) const;
Variant &operator[](int64_t p_index);
void set_typed(uint32_t p_type, const StringName &p_class_name, const Variant &p_script);
struct Iterator {
_FORCE_INLINE_ Variant &operator*() const;
_FORCE_INLINE_ Variant *operator->() const;
_FORCE_INLINE_ Iterator &operator++();
_FORCE_INLINE_ Iterator &operator--();
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(Variant *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
Variant *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const Variant &operator*() const;
_FORCE_INLINE_ const Variant *operator->() const;
_FORCE_INLINE_ ConstIterator &operator++();
_FORCE_INLINE_ ConstIterator &operator--();
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const Variant *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const Variant *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin();
_FORCE_INLINE_ Iterator end();
_FORCE_INLINE_ ConstIterator begin() const;
_FORCE_INLINE_ ConstIterator end() const;
_FORCE_INLINE_ Array(std::initializer_list<Variant> p_init);
};
} // namespace godot
@@ -0,0 +1,43 @@
/**************************************************************************/
/* builtin_binds.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/variant/builtin_types.hpp>
VARIANT_ENUM_CAST(Vector2::Axis);
VARIANT_ENUM_CAST(Vector2i::Axis);
VARIANT_ENUM_CAST(Vector3::Axis);
VARIANT_ENUM_CAST(Vector3i::Axis);
VARIANT_ENUM_CAST(Vector4::Axis);
VARIANT_ENUM_CAST(Vector4i::Axis);
VARIANT_ENUM_CAST(Projection::Planes);
@@ -0,0 +1,68 @@
/**************************************************************************/
/* builtin_types.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/variant/aabb.hpp>
#include <godot_cpp/variant/array.hpp>
#include <godot_cpp/variant/basis.hpp>
#include <godot_cpp/variant/callable.hpp>
#include <godot_cpp/variant/color.hpp>
#include <godot_cpp/variant/dictionary.hpp>
#include <godot_cpp/variant/node_path.hpp>
#include <godot_cpp/variant/packed_byte_array.hpp>
#include <godot_cpp/variant/packed_color_array.hpp>
#include <godot_cpp/variant/packed_float32_array.hpp>
#include <godot_cpp/variant/packed_float64_array.hpp>
#include <godot_cpp/variant/packed_int32_array.hpp>
#include <godot_cpp/variant/packed_int64_array.hpp>
#include <godot_cpp/variant/packed_string_array.hpp>
#include <godot_cpp/variant/packed_vector2_array.hpp>
#include <godot_cpp/variant/packed_vector3_array.hpp>
#include <godot_cpp/variant/packed_vector4_array.hpp>
#include <godot_cpp/variant/plane.hpp>
#include <godot_cpp/variant/projection.hpp>
#include <godot_cpp/variant/quaternion.hpp>
#include <godot_cpp/variant/rect2.hpp>
#include <godot_cpp/variant/rect2i.hpp>
#include <godot_cpp/variant/rid.hpp>
#include <godot_cpp/variant/signal.hpp>
#include <godot_cpp/variant/string.hpp>
#include <godot_cpp/variant/string_name.hpp>
#include <godot_cpp/variant/transform2d.hpp>
#include <godot_cpp/variant/transform3d.hpp>
#include <godot_cpp/variant/vector2.hpp>
#include <godot_cpp/variant/vector2i.hpp>
#include <godot_cpp/variant/vector3.hpp>
#include <godot_cpp/variant/vector3i.hpp>
#include <godot_cpp/variant/vector4.hpp>
#include <godot_cpp/variant/vector4i.hpp>
@@ -0,0 +1,97 @@
/**************************************************************************/
/* builtin_vararg_methods.hpp */
/**************************************************************************/
/* 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.
#pragma once
template <typename... Args>
Variant Callable::call(const Args &...p_args) const {
std::array<Variant, 0 + sizeof...(Args)> variant_args{{ Variant(p_args)... }};
std::array<const Variant *, 0 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
Variant ret;
_method_bindings.method_call((GDExtensionTypePtr)&opaque, reinterpret_cast<GDExtensionConstTypePtr *>(call_args.data()), &ret, 0 + sizeof...(Args));
return ret;
}
template <typename... Args>
void Callable::call_deferred(const Args &...p_args) const {
std::array<Variant, 0 + sizeof...(Args)> variant_args{{ Variant(p_args)... }};
std::array<const Variant *, 0 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
_method_bindings.method_call_deferred((GDExtensionTypePtr)&opaque, reinterpret_cast<GDExtensionConstTypePtr *>(call_args.data()), nullptr, 0 + sizeof...(Args));
}
template <typename... Args>
void Callable::rpc(const Args &...p_args) const {
std::array<Variant, 0 + sizeof...(Args)> variant_args{{ Variant(p_args)... }};
std::array<const Variant *, 0 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
_method_bindings.method_rpc((GDExtensionTypePtr)&opaque, reinterpret_cast<GDExtensionConstTypePtr *>(call_args.data()), nullptr, 0 + sizeof...(Args));
}
template <typename... Args>
void Callable::rpc_id(int64_t p_peer_id, const Args &...p_args) const {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ Variant(p_peer_id), Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
_method_bindings.method_rpc_id((GDExtensionTypePtr)&opaque, reinterpret_cast<GDExtensionConstTypePtr *>(call_args.data()), nullptr, 1 + sizeof...(Args));
}
template <typename... Args>
Callable Callable::bind(const Args &...p_args) const {
std::array<Variant, 0 + sizeof...(Args)> variant_args{{ Variant(p_args)... }};
std::array<const Variant *, 0 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
Callable ret;
_method_bindings.method_bind((GDExtensionTypePtr)&opaque, reinterpret_cast<GDExtensionConstTypePtr *>(call_args.data()), &ret, 0 + sizeof...(Args));
return ret;
}
template <typename... Args>
void Signal::emit(const Args &...p_args) const {
std::array<Variant, 0 + sizeof...(Args)> variant_args{{ Variant(p_args)... }};
std::array<const Variant *, 0 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
_method_bindings.method_emit((GDExtensionTypePtr)&opaque, reinterpret_cast<GDExtensionConstTypePtr *>(call_args.data()), nullptr, 0 + sizeof...(Args));
}
@@ -0,0 +1,141 @@
/**************************************************************************/
/* callable.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/variant/callable_custom.hpp>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class Object;
class StringName;
class Variant;
class Callable {
static constexpr size_t CALLABLE_SIZE = 16;
alignas(8) uint8_t opaque[CALLABLE_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_create;
GDExtensionPtrBuiltInMethod method_callv;
GDExtensionPtrBuiltInMethod method_is_null;
GDExtensionPtrBuiltInMethod method_is_custom;
GDExtensionPtrBuiltInMethod method_is_standard;
GDExtensionPtrBuiltInMethod method_is_valid;
GDExtensionPtrBuiltInMethod method_get_object;
GDExtensionPtrBuiltInMethod method_get_object_id;
GDExtensionPtrBuiltInMethod method_get_method;
GDExtensionPtrBuiltInMethod method_get_argument_count;
GDExtensionPtrBuiltInMethod method_get_bound_arguments_count;
GDExtensionPtrBuiltInMethod method_get_bound_arguments;
GDExtensionPtrBuiltInMethod method_get_unbound_arguments_count;
GDExtensionPtrBuiltInMethod method_hash;
GDExtensionPtrBuiltInMethod method_bindv;
GDExtensionPtrBuiltInMethod method_unbind;
GDExtensionPtrBuiltInMethod method_call;
GDExtensionPtrBuiltInMethod method_call_deferred;
GDExtensionPtrBuiltInMethod method_rpc;
GDExtensionPtrBuiltInMethod method_rpc_id;
GDExtensionPtrBuiltInMethod method_bind;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_equal_Callable;
GDExtensionPtrOperatorEvaluator operator_not_equal_Callable;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
Callable(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[CALLABLE_SIZE]>(&opaque); }
Callable();
Callable(const Callable &p_from);
Callable(Object *p_object, const StringName &p_method);
Callable(Callable &&p_other);
Callable(CallableCustom *p_custom);
CallableCustom *get_custom() const;
~Callable();
static Callable create(const Variant &p_variant, const StringName &p_method);
Variant callv(const Array &p_arguments) const;
bool is_null() const;
bool is_custom() const;
bool is_standard() const;
bool is_valid() const;
Object *get_object() const;
int64_t get_object_id() const;
StringName get_method() const;
int64_t get_argument_count() const;
int64_t get_bound_arguments_count() const;
Array get_bound_arguments() const;
int64_t get_unbound_arguments_count() const;
int64_t hash() const;
Callable bindv(const Array &p_arguments);
Callable unbind(int64_t p_argcount) const;
template <typename... Args>
Variant call(const Args &...p_args) const;
template <typename... Args>
void call_deferred(const Args &...p_args) const;
template <typename... Args>
void rpc(const Args &...p_args) const;
template <typename... Args>
void rpc_id(int64_t p_peer_id, const Args &...p_args) const;
template <typename... Args>
Callable bind(const Args &...p_args) const;
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const Callable &p_other) const;
bool operator!=(const Callable &p_other) const;
Callable &operator=(const Callable &p_other);
Callable &operator=(Callable &&p_other);
};
} // namespace godot
@@ -0,0 +1,166 @@
/**************************************************************************/
/* dictionary.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <gdextension_interface.h>
namespace godot {
class Array;
class StringName;
class Variant;
class Dictionary {
static constexpr size_t DICTIONARY_SIZE = 8;
alignas(8) uint8_t opaque[DICTIONARY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_assign;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_merge;
GDExtensionPtrBuiltInMethod method_merged;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_has_all;
GDExtensionPtrBuiltInMethod method_find_key;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrBuiltInMethod method_hash;
GDExtensionPtrBuiltInMethod method_keys;
GDExtensionPtrBuiltInMethod method_values;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_duplicate_deep;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_get_or_add;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_is_typed;
GDExtensionPtrBuiltInMethod method_is_typed_key;
GDExtensionPtrBuiltInMethod method_is_typed_value;
GDExtensionPtrBuiltInMethod method_is_same_typed;
GDExtensionPtrBuiltInMethod method_is_same_typed_key;
GDExtensionPtrBuiltInMethod method_is_same_typed_value;
GDExtensionPtrBuiltInMethod method_get_typed_key_builtin;
GDExtensionPtrBuiltInMethod method_get_typed_value_builtin;
GDExtensionPtrBuiltInMethod method_get_typed_key_class_name;
GDExtensionPtrBuiltInMethod method_get_typed_value_class_name;
GDExtensionPtrBuiltInMethod method_get_typed_key_script;
GDExtensionPtrBuiltInMethod method_get_typed_value_script;
GDExtensionPtrBuiltInMethod method_make_read_only;
GDExtensionPtrBuiltInMethod method_is_read_only;
GDExtensionPtrBuiltInMethod method_recursive_equal;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrKeyedSetter keyed_setter;
GDExtensionPtrKeyedGetter keyed_getter;
GDExtensionPtrKeyedChecker keyed_checker;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_equal_Dictionary;
GDExtensionPtrOperatorEvaluator operator_not_equal_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
Dictionary(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[DICTIONARY_SIZE]>(&opaque); }
Dictionary();
Dictionary(const Dictionary &p_from);
Dictionary(const Dictionary &p_base, int64_t p_key_type, const StringName &p_key_class_name, const Variant &p_key_script, int64_t p_value_type, const StringName &p_value_class_name, const Variant &p_value_script);
Dictionary(Dictionary &&p_other);
~Dictionary();
int64_t size() const;
bool is_empty() const;
void clear();
void assign(const Dictionary &p_dictionary);
void sort();
void merge(const Dictionary &p_dictionary, bool p_overwrite = false);
Dictionary merged(const Dictionary &p_dictionary, bool p_overwrite = false) const;
bool has(const Variant &p_key) const;
bool has_all(const Array &p_keys) const;
Variant find_key(const Variant &p_value) const;
bool erase(const Variant &p_key);
int64_t hash() const;
Array keys() const;
Array values() const;
Dictionary duplicate(bool p_deep = false) const;
Dictionary duplicate_deep(int64_t p_deep_subresources_mode = 1) const;
Variant get(const Variant &p_key, const Variant &p_default) const;
Variant get_or_add(const Variant &p_key, const Variant &p_default);
bool set(const Variant &p_key, const Variant &p_value);
bool is_typed() const;
bool is_typed_key() const;
bool is_typed_value() const;
bool is_same_typed(const Dictionary &p_dictionary) const;
bool is_same_typed_key(const Dictionary &p_dictionary) const;
bool is_same_typed_value(const Dictionary &p_dictionary) const;
int64_t get_typed_key_builtin() const;
int64_t get_typed_value_builtin() const;
StringName get_typed_key_class_name() const;
StringName get_typed_value_class_name() const;
Variant get_typed_key_script() const;
Variant get_typed_value_script() const;
void make_read_only();
bool is_read_only() const;
bool recursive_equal(const Dictionary &p_dictionary, int64_t p_recursion_count) const;
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const Dictionary &p_other) const;
bool operator!=(const Dictionary &p_other) const;
Dictionary &operator=(const Dictionary &p_other);
Dictionary &operator=(Dictionary &&p_other);
const Variant &operator[](const Variant &p_key) const;
Variant &operator[](const Variant &p_key);
#if GODOT_VERSION_MINOR >= 4
void set_typed(uint32_t p_key_type, const StringName &p_key_class_name, const Variant &p_key_script, uint32_t p_value_type, const StringName &p_value_class_name, const Variant &p_value_script);
#endif
};
} // namespace godot
@@ -0,0 +1,116 @@
/**************************************************************************/
/* node_path.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class String;
class StringName;
class Variant;
class NodePath {
static constexpr size_t NODE_PATH_SIZE = 8;
alignas(8) uint8_t opaque[NODE_PATH_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_is_absolute;
GDExtensionPtrBuiltInMethod method_get_name_count;
GDExtensionPtrBuiltInMethod method_get_name;
GDExtensionPtrBuiltInMethod method_get_subname_count;
GDExtensionPtrBuiltInMethod method_hash;
GDExtensionPtrBuiltInMethod method_get_subname;
GDExtensionPtrBuiltInMethod method_get_concatenated_names;
GDExtensionPtrBuiltInMethod method_get_concatenated_subnames;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_get_as_property_path;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_equal_NodePath;
GDExtensionPtrOperatorEvaluator operator_not_equal_NodePath;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
NodePath(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[NODE_PATH_SIZE]>(&opaque); }
NodePath();
NodePath(const NodePath &p_from);
NodePath(const String &p_from);
NodePath(NodePath &&p_other);
NodePath(const char *p_from);
NodePath(const wchar_t *p_from);
NodePath(const char16_t *p_from);
NodePath(const char32_t *p_from);
~NodePath();
bool is_absolute() const;
int64_t get_name_count() const;
StringName get_name(int64_t p_idx) const;
int64_t get_subname_count() const;
int64_t hash() const;
StringName get_subname(int64_t p_idx) const;
StringName get_concatenated_names() const;
StringName get_concatenated_subnames() const;
NodePath slice(int64_t p_begin, int64_t p_end = 2147483647) const;
NodePath get_as_property_path() const;
bool is_empty() const;
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const NodePath &p_other) const;
bool operator!=(const NodePath &p_other) const;
NodePath &operator=(const NodePath &p_other);
NodePath &operator=(NodePath &&p_other);
};
} // namespace godot
@@ -0,0 +1,320 @@
/**************************************************************************/
/* packed_byte_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <godot_cpp/variant/string.hpp>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedColorArray;
class PackedFloat32Array;
class PackedFloat64Array;
class PackedInt32Array;
class PackedInt64Array;
class PackedVector2Array;
class PackedVector3Array;
class PackedVector4Array;
class Variant;
class PackedByteArray {
static constexpr size_t PACKED_BYTE_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_BYTE_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrBuiltInMethod method_get_string_from_ascii;
GDExtensionPtrBuiltInMethod method_get_string_from_utf8;
GDExtensionPtrBuiltInMethod method_get_string_from_utf16;
GDExtensionPtrBuiltInMethod method_get_string_from_utf32;
GDExtensionPtrBuiltInMethod method_get_string_from_wchar;
GDExtensionPtrBuiltInMethod method_get_string_from_multibyte_char;
GDExtensionPtrBuiltInMethod method_hex_encode;
GDExtensionPtrBuiltInMethod method_compress;
GDExtensionPtrBuiltInMethod method_decompress;
GDExtensionPtrBuiltInMethod method_decompress_dynamic;
GDExtensionPtrBuiltInMethod method_decode_u8;
GDExtensionPtrBuiltInMethod method_decode_s8;
GDExtensionPtrBuiltInMethod method_decode_u16;
GDExtensionPtrBuiltInMethod method_decode_s16;
GDExtensionPtrBuiltInMethod method_decode_u32;
GDExtensionPtrBuiltInMethod method_decode_s32;
GDExtensionPtrBuiltInMethod method_decode_u64;
GDExtensionPtrBuiltInMethod method_decode_s64;
GDExtensionPtrBuiltInMethod method_decode_half;
GDExtensionPtrBuiltInMethod method_decode_float;
GDExtensionPtrBuiltInMethod method_decode_double;
GDExtensionPtrBuiltInMethod method_has_encoded_var;
GDExtensionPtrBuiltInMethod method_decode_var;
GDExtensionPtrBuiltInMethod method_decode_var_size;
GDExtensionPtrBuiltInMethod method_to_int32_array;
GDExtensionPtrBuiltInMethod method_to_int64_array;
GDExtensionPtrBuiltInMethod method_to_float32_array;
GDExtensionPtrBuiltInMethod method_to_float64_array;
GDExtensionPtrBuiltInMethod method_to_vector2_array;
GDExtensionPtrBuiltInMethod method_to_vector3_array;
GDExtensionPtrBuiltInMethod method_to_vector4_array;
GDExtensionPtrBuiltInMethod method_to_color_array;
GDExtensionPtrBuiltInMethod method_bswap16;
GDExtensionPtrBuiltInMethod method_bswap32;
GDExtensionPtrBuiltInMethod method_bswap64;
GDExtensionPtrBuiltInMethod method_encode_u8;
GDExtensionPtrBuiltInMethod method_encode_s8;
GDExtensionPtrBuiltInMethod method_encode_u16;
GDExtensionPtrBuiltInMethod method_encode_s16;
GDExtensionPtrBuiltInMethod method_encode_u32;
GDExtensionPtrBuiltInMethod method_encode_s32;
GDExtensionPtrBuiltInMethod method_encode_u64;
GDExtensionPtrBuiltInMethod method_encode_s64;
GDExtensionPtrBuiltInMethod method_encode_half;
GDExtensionPtrBuiltInMethod method_encode_float;
GDExtensionPtrBuiltInMethod method_encode_double;
GDExtensionPtrBuiltInMethod method_encode_var;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedByteArray;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedByteArray;
GDExtensionPtrOperatorEvaluator operator_add_PackedByteArray;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedByteArray(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_BYTE_ARRAY_SIZE]>(&opaque); }
PackedByteArray();
PackedByteArray(const PackedByteArray &p_from);
PackedByteArray(const Array &p_from);
PackedByteArray(PackedByteArray &&p_other);
~PackedByteArray();
int64_t get(int64_t p_index) const;
void set(int64_t p_index, int64_t p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(int64_t p_value);
bool append(int64_t p_value);
void append_array(const PackedByteArray &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, int64_t p_value);
void fill(int64_t p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(int64_t p_value) const;
void reverse();
PackedByteArray slice(int64_t p_begin, int64_t p_end = 2147483647) const;
void sort();
int64_t bsearch(int64_t p_value, bool p_before = true) const;
PackedByteArray duplicate() const;
int64_t find(int64_t p_value, int64_t p_from = 0) const;
int64_t rfind(int64_t p_value, int64_t p_from = -1) const;
int64_t count(int64_t p_value) const;
bool erase(int64_t p_value);
String get_string_from_ascii() const;
String get_string_from_utf8() const;
String get_string_from_utf16() const;
String get_string_from_utf32() const;
String get_string_from_wchar() const;
String get_string_from_multibyte_char(const String &p_encoding = String()) const;
String hex_encode() const;
PackedByteArray compress(int64_t p_compression_mode = 0) const;
PackedByteArray decompress(int64_t p_buffer_size, int64_t p_compression_mode = 0) const;
PackedByteArray decompress_dynamic(int64_t p_max_output_size, int64_t p_compression_mode = 0) const;
int64_t decode_u8(int64_t p_byte_offset) const;
int64_t decode_s8(int64_t p_byte_offset) const;
int64_t decode_u16(int64_t p_byte_offset) const;
int64_t decode_s16(int64_t p_byte_offset) const;
int64_t decode_u32(int64_t p_byte_offset) const;
int64_t decode_s32(int64_t p_byte_offset) const;
int64_t decode_u64(int64_t p_byte_offset) const;
int64_t decode_s64(int64_t p_byte_offset) const;
double decode_half(int64_t p_byte_offset) const;
double decode_float(int64_t p_byte_offset) const;
double decode_double(int64_t p_byte_offset) const;
bool has_encoded_var(int64_t p_byte_offset, bool p_allow_objects = false) const;
Variant decode_var(int64_t p_byte_offset, bool p_allow_objects = false) const;
int64_t decode_var_size(int64_t p_byte_offset, bool p_allow_objects = false) const;
PackedInt32Array to_int32_array() const;
PackedInt64Array to_int64_array() const;
PackedFloat32Array to_float32_array() const;
PackedFloat64Array to_float64_array() const;
PackedVector2Array to_vector2_array() const;
PackedVector3Array to_vector3_array() const;
PackedVector4Array to_vector4_array() const;
PackedColorArray to_color_array() const;
void bswap16(int64_t p_offset = 0, int64_t p_count = -1);
void bswap32(int64_t p_offset = 0, int64_t p_count = -1);
void bswap64(int64_t p_offset = 0, int64_t p_count = -1);
void encode_u8(int64_t p_byte_offset, int64_t p_value);
void encode_s8(int64_t p_byte_offset, int64_t p_value);
void encode_u16(int64_t p_byte_offset, int64_t p_value);
void encode_s16(int64_t p_byte_offset, int64_t p_value);
void encode_u32(int64_t p_byte_offset, int64_t p_value);
void encode_s32(int64_t p_byte_offset, int64_t p_value);
void encode_u64(int64_t p_byte_offset, int64_t p_value);
void encode_s64(int64_t p_byte_offset, int64_t p_value);
void encode_half(int64_t p_byte_offset, double p_value);
void encode_float(int64_t p_byte_offset, double p_value);
void encode_double(int64_t p_byte_offset, double p_value);
int64_t encode_var(int64_t p_byte_offset, const Variant &p_value, bool p_allow_objects = false);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedByteArray &p_other) const;
bool operator!=(const PackedByteArray &p_other) const;
PackedByteArray operator+(const PackedByteArray &p_other) const;
PackedByteArray &operator=(const PackedByteArray &p_other);
PackedByteArray &operator=(PackedByteArray &&p_other);
const uint8_t &operator[](int64_t p_index) const;
uint8_t &operator[](int64_t p_index);
const uint8_t *ptr() const;
uint8_t *ptrw();
struct Iterator {
_FORCE_INLINE_ uint8_t &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ uint8_t *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(uint8_t *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
uint8_t *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const uint8_t &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const uint8_t *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const uint8_t *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const uint8_t *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedByteArray(std::initializer_list<uint8_t> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const uint8_t &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,222 @@
/**************************************************************************/
/* packed_color_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/variant/color.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
struct Color;
class Dictionary;
class PackedByteArray;
class Variant;
class PackedColorArray {
static constexpr size_t PACKED_COLOR_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_COLOR_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedColorArray;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedColorArray;
GDExtensionPtrOperatorEvaluator operator_add_PackedColorArray;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedColorArray(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_COLOR_ARRAY_SIZE]>(&opaque); }
PackedColorArray();
PackedColorArray(const PackedColorArray &p_from);
PackedColorArray(const Array &p_from);
PackedColorArray(PackedColorArray &&p_other);
~PackedColorArray();
Color get(int64_t p_index) const;
void set(int64_t p_index, const Color &p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(const Color &p_value);
bool append(const Color &p_value);
void append_array(const PackedColorArray &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, const Color &p_value);
void fill(const Color &p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(const Color &p_value) const;
void reverse();
PackedColorArray slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(const Color &p_value, bool p_before = true) const;
PackedColorArray duplicate() const;
int64_t find(const Color &p_value, int64_t p_from = 0) const;
int64_t rfind(const Color &p_value, int64_t p_from = -1) const;
int64_t count(const Color &p_value) const;
bool erase(const Color &p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedColorArray &p_other) const;
bool operator!=(const PackedColorArray &p_other) const;
PackedColorArray operator+(const PackedColorArray &p_other) const;
PackedColorArray &operator=(const PackedColorArray &p_other);
PackedColorArray &operator=(PackedColorArray &&p_other);
const Color &operator[](int64_t p_index) const;
Color &operator[](int64_t p_index);
const Color *ptr() const;
Color *ptrw();
struct Iterator {
_FORCE_INLINE_ Color &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ Color *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(Color *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
Color *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const Color &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const Color *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const Color *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const Color *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedColorArray(std::initializer_list<Color> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const Color &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,219 @@
/**************************************************************************/
/* packed_float32_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
class Variant;
class PackedFloat32Array {
static constexpr size_t PACKED_FLOAT32_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_FLOAT32_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedFloat32Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedFloat32Array;
GDExtensionPtrOperatorEvaluator operator_add_PackedFloat32Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedFloat32Array(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_FLOAT32_ARRAY_SIZE]>(&opaque); }
PackedFloat32Array();
PackedFloat32Array(const PackedFloat32Array &p_from);
PackedFloat32Array(const Array &p_from);
PackedFloat32Array(PackedFloat32Array &&p_other);
~PackedFloat32Array();
double get(int64_t p_index) const;
void set(int64_t p_index, double p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(double p_value);
bool append(double p_value);
void append_array(const PackedFloat32Array &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, double p_value);
void fill(double p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(double p_value) const;
void reverse();
PackedFloat32Array slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(double p_value, bool p_before = true) const;
PackedFloat32Array duplicate() const;
int64_t find(double p_value, int64_t p_from = 0) const;
int64_t rfind(double p_value, int64_t p_from = -1) const;
int64_t count(double p_value) const;
bool erase(double p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedFloat32Array &p_other) const;
bool operator!=(const PackedFloat32Array &p_other) const;
PackedFloat32Array operator+(const PackedFloat32Array &p_other) const;
PackedFloat32Array &operator=(const PackedFloat32Array &p_other);
PackedFloat32Array &operator=(PackedFloat32Array &&p_other);
const float &operator[](int64_t p_index) const;
float &operator[](int64_t p_index);
const float *ptr() const;
float *ptrw();
struct Iterator {
_FORCE_INLINE_ float &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ float *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(float *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
float *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const float &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const float *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const float *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const float *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedFloat32Array(std::initializer_list<float> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const float &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,219 @@
/**************************************************************************/
/* packed_float64_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
class Variant;
class PackedFloat64Array {
static constexpr size_t PACKED_FLOAT64_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_FLOAT64_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedFloat64Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedFloat64Array;
GDExtensionPtrOperatorEvaluator operator_add_PackedFloat64Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedFloat64Array(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_FLOAT64_ARRAY_SIZE]>(&opaque); }
PackedFloat64Array();
PackedFloat64Array(const PackedFloat64Array &p_from);
PackedFloat64Array(const Array &p_from);
PackedFloat64Array(PackedFloat64Array &&p_other);
~PackedFloat64Array();
double get(int64_t p_index) const;
void set(int64_t p_index, double p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(double p_value);
bool append(double p_value);
void append_array(const PackedFloat64Array &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, double p_value);
void fill(double p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(double p_value) const;
void reverse();
PackedFloat64Array slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(double p_value, bool p_before = true) const;
PackedFloat64Array duplicate() const;
int64_t find(double p_value, int64_t p_from = 0) const;
int64_t rfind(double p_value, int64_t p_from = -1) const;
int64_t count(double p_value) const;
bool erase(double p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedFloat64Array &p_other) const;
bool operator!=(const PackedFloat64Array &p_other) const;
PackedFloat64Array operator+(const PackedFloat64Array &p_other) const;
PackedFloat64Array &operator=(const PackedFloat64Array &p_other);
PackedFloat64Array &operator=(PackedFloat64Array &&p_other);
const double &operator[](int64_t p_index) const;
double &operator[](int64_t p_index);
const double *ptr() const;
double *ptrw();
struct Iterator {
_FORCE_INLINE_ double &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ double *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(double *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
double *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const double &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const double *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const double *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const double *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedFloat64Array(std::initializer_list<double> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const double &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,219 @@
/**************************************************************************/
/* packed_int32_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
class Variant;
class PackedInt32Array {
static constexpr size_t PACKED_INT32_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_INT32_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedInt32Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedInt32Array;
GDExtensionPtrOperatorEvaluator operator_add_PackedInt32Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedInt32Array(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_INT32_ARRAY_SIZE]>(&opaque); }
PackedInt32Array();
PackedInt32Array(const PackedInt32Array &p_from);
PackedInt32Array(const Array &p_from);
PackedInt32Array(PackedInt32Array &&p_other);
~PackedInt32Array();
int64_t get(int64_t p_index) const;
void set(int64_t p_index, int64_t p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(int64_t p_value);
bool append(int64_t p_value);
void append_array(const PackedInt32Array &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, int64_t p_value);
void fill(int64_t p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(int64_t p_value) const;
void reverse();
PackedInt32Array slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(int64_t p_value, bool p_before = true) const;
PackedInt32Array duplicate() const;
int64_t find(int64_t p_value, int64_t p_from = 0) const;
int64_t rfind(int64_t p_value, int64_t p_from = -1) const;
int64_t count(int64_t p_value) const;
bool erase(int64_t p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedInt32Array &p_other) const;
bool operator!=(const PackedInt32Array &p_other) const;
PackedInt32Array operator+(const PackedInt32Array &p_other) const;
PackedInt32Array &operator=(const PackedInt32Array &p_other);
PackedInt32Array &operator=(PackedInt32Array &&p_other);
const int32_t &operator[](int64_t p_index) const;
int32_t &operator[](int64_t p_index);
const int32_t *ptr() const;
int32_t *ptrw();
struct Iterator {
_FORCE_INLINE_ int32_t &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ int32_t *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(int32_t *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
int32_t *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const int32_t &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const int32_t *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const int32_t *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const int32_t *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedInt32Array(std::initializer_list<int32_t> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const int32_t &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,219 @@
/**************************************************************************/
/* packed_int64_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
class Variant;
class PackedInt64Array {
static constexpr size_t PACKED_INT64_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_INT64_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedInt64Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedInt64Array;
GDExtensionPtrOperatorEvaluator operator_add_PackedInt64Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedInt64Array(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_INT64_ARRAY_SIZE]>(&opaque); }
PackedInt64Array();
PackedInt64Array(const PackedInt64Array &p_from);
PackedInt64Array(const Array &p_from);
PackedInt64Array(PackedInt64Array &&p_other);
~PackedInt64Array();
int64_t get(int64_t p_index) const;
void set(int64_t p_index, int64_t p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(int64_t p_value);
bool append(int64_t p_value);
void append_array(const PackedInt64Array &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, int64_t p_value);
void fill(int64_t p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(int64_t p_value) const;
void reverse();
PackedInt64Array slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(int64_t p_value, bool p_before = true) const;
PackedInt64Array duplicate() const;
int64_t find(int64_t p_value, int64_t p_from = 0) const;
int64_t rfind(int64_t p_value, int64_t p_from = -1) const;
int64_t count(int64_t p_value) const;
bool erase(int64_t p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedInt64Array &p_other) const;
bool operator!=(const PackedInt64Array &p_other) const;
PackedInt64Array operator+(const PackedInt64Array &p_other) const;
PackedInt64Array &operator=(const PackedInt64Array &p_other);
PackedInt64Array &operator=(PackedInt64Array &&p_other);
const int64_t &operator[](int64_t p_index) const;
int64_t &operator[](int64_t p_index);
const int64_t *ptr() const;
int64_t *ptrw();
struct Iterator {
_FORCE_INLINE_ int64_t &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ int64_t *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(int64_t *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
int64_t *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const int64_t &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const int64_t *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const int64_t *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const int64_t *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedInt64Array(std::initializer_list<int64_t> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const int64_t &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,222 @@
/**************************************************************************/
/* packed_string_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/variant/string.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
class String;
class Variant;
class PackedStringArray {
static constexpr size_t PACKED_STRING_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_STRING_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedStringArray;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedStringArray;
GDExtensionPtrOperatorEvaluator operator_add_PackedStringArray;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedStringArray(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_STRING_ARRAY_SIZE]>(&opaque); }
PackedStringArray();
PackedStringArray(const PackedStringArray &p_from);
PackedStringArray(const Array &p_from);
PackedStringArray(PackedStringArray &&p_other);
~PackedStringArray();
String get(int64_t p_index) const;
void set(int64_t p_index, const String &p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(const String &p_value);
bool append(const String &p_value);
void append_array(const PackedStringArray &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, const String &p_value);
void fill(const String &p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(const String &p_value) const;
void reverse();
PackedStringArray slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(const String &p_value, bool p_before = true) const;
PackedStringArray duplicate() const;
int64_t find(const String &p_value, int64_t p_from = 0) const;
int64_t rfind(const String &p_value, int64_t p_from = -1) const;
int64_t count(const String &p_value) const;
bool erase(const String &p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedStringArray &p_other) const;
bool operator!=(const PackedStringArray &p_other) const;
PackedStringArray operator+(const PackedStringArray &p_other) const;
PackedStringArray &operator=(const PackedStringArray &p_other);
PackedStringArray &operator=(PackedStringArray &&p_other);
const String &operator[](int64_t p_index) const;
String &operator[](int64_t p_index);
const String *ptr() const;
String *ptrw();
struct Iterator {
_FORCE_INLINE_ String &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ String *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(String *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
String *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const String &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const String *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const String *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const String *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedStringArray(std::initializer_list<String> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const String &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,225 @@
/**************************************************************************/
/* packed_vector2_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/variant/vector2.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
struct Transform2D;
class Variant;
struct Vector2;
class PackedVector2Array {
static constexpr size_t PACKED_VECTOR2_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_VECTOR2_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_multiply_Transform2D;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedVector2Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedVector2Array;
GDExtensionPtrOperatorEvaluator operator_add_PackedVector2Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedVector2Array(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_VECTOR2_ARRAY_SIZE]>(&opaque); }
PackedVector2Array();
PackedVector2Array(const PackedVector2Array &p_from);
PackedVector2Array(const Array &p_from);
PackedVector2Array(PackedVector2Array &&p_other);
~PackedVector2Array();
Vector2 get(int64_t p_index) const;
void set(int64_t p_index, const Vector2 &p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(const Vector2 &p_value);
bool append(const Vector2 &p_value);
void append_array(const PackedVector2Array &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, const Vector2 &p_value);
void fill(const Vector2 &p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(const Vector2 &p_value) const;
void reverse();
PackedVector2Array slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(const Vector2 &p_value, bool p_before = true) const;
PackedVector2Array duplicate() const;
int64_t find(const Vector2 &p_value, int64_t p_from = 0) const;
int64_t rfind(const Vector2 &p_value, int64_t p_from = -1) const;
int64_t count(const Vector2 &p_value) const;
bool erase(const Vector2 &p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
PackedVector2Array operator*(const Transform2D &p_other) const;
bool operator==(const PackedVector2Array &p_other) const;
bool operator!=(const PackedVector2Array &p_other) const;
PackedVector2Array operator+(const PackedVector2Array &p_other) const;
PackedVector2Array &operator=(const PackedVector2Array &p_other);
PackedVector2Array &operator=(PackedVector2Array &&p_other);
const Vector2 &operator[](int64_t p_index) const;
Vector2 &operator[](int64_t p_index);
const Vector2 *ptr() const;
Vector2 *ptrw();
struct Iterator {
_FORCE_INLINE_ Vector2 &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ Vector2 *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(Vector2 *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
Vector2 *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const Vector2 &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const Vector2 *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const Vector2 *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const Vector2 *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedVector2Array(std::initializer_list<Vector2> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const Vector2 &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,225 @@
/**************************************************************************/
/* packed_vector3_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/variant/vector3.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
struct Transform3D;
class Variant;
struct Vector3;
class PackedVector3Array {
static constexpr size_t PACKED_VECTOR3_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_VECTOR3_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_multiply_Transform3D;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedVector3Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedVector3Array;
GDExtensionPtrOperatorEvaluator operator_add_PackedVector3Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedVector3Array(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_VECTOR3_ARRAY_SIZE]>(&opaque); }
PackedVector3Array();
PackedVector3Array(const PackedVector3Array &p_from);
PackedVector3Array(const Array &p_from);
PackedVector3Array(PackedVector3Array &&p_other);
~PackedVector3Array();
Vector3 get(int64_t p_index) const;
void set(int64_t p_index, const Vector3 &p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(const Vector3 &p_value);
bool append(const Vector3 &p_value);
void append_array(const PackedVector3Array &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, const Vector3 &p_value);
void fill(const Vector3 &p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(const Vector3 &p_value) const;
void reverse();
PackedVector3Array slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(const Vector3 &p_value, bool p_before = true) const;
PackedVector3Array duplicate() const;
int64_t find(const Vector3 &p_value, int64_t p_from = 0) const;
int64_t rfind(const Vector3 &p_value, int64_t p_from = -1) const;
int64_t count(const Vector3 &p_value) const;
bool erase(const Vector3 &p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
PackedVector3Array operator*(const Transform3D &p_other) const;
bool operator==(const PackedVector3Array &p_other) const;
bool operator!=(const PackedVector3Array &p_other) const;
PackedVector3Array operator+(const PackedVector3Array &p_other) const;
PackedVector3Array &operator=(const PackedVector3Array &p_other);
PackedVector3Array &operator=(PackedVector3Array &&p_other);
const Vector3 &operator[](int64_t p_index) const;
Vector3 &operator[](int64_t p_index);
const Vector3 *ptr() const;
Vector3 *ptrw();
struct Iterator {
_FORCE_INLINE_ Vector3 &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ Vector3 *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(Vector3 *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
Vector3 *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const Vector3 &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const Vector3 *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const Vector3 *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const Vector3 *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedVector3Array(std::initializer_list<Vector3> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const Vector3 &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,222 @@
/**************************************************************************/
/* packed_vector4_array.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/variant/vector4.hpp>
#include <godot_cpp/core/error_macros.hpp>
#include <initializer_list>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class PackedByteArray;
class Variant;
struct Vector4;
class PackedVector4Array {
static constexpr size_t PACKED_VECTOR4_ARRAY_SIZE = 16;
alignas(8) uint8_t opaque[PACKED_VECTOR4_ARRAY_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_get;
GDExtensionPtrBuiltInMethod method_set;
GDExtensionPtrBuiltInMethod method_size;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_push_back;
GDExtensionPtrBuiltInMethod method_append;
GDExtensionPtrBuiltInMethod method_append_array;
GDExtensionPtrBuiltInMethod method_remove_at;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_fill;
GDExtensionPtrBuiltInMethod method_resize;
GDExtensionPtrBuiltInMethod method_clear;
GDExtensionPtrBuiltInMethod method_has;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_slice;
GDExtensionPtrBuiltInMethod method_to_byte_array;
GDExtensionPtrBuiltInMethod method_sort;
GDExtensionPtrBuiltInMethod method_bsearch;
GDExtensionPtrBuiltInMethod method_duplicate;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_equal_PackedVector4Array;
GDExtensionPtrOperatorEvaluator operator_not_equal_PackedVector4Array;
GDExtensionPtrOperatorEvaluator operator_add_PackedVector4Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
PackedVector4Array(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[PACKED_VECTOR4_ARRAY_SIZE]>(&opaque); }
PackedVector4Array();
PackedVector4Array(const PackedVector4Array &p_from);
PackedVector4Array(const Array &p_from);
PackedVector4Array(PackedVector4Array &&p_other);
~PackedVector4Array();
Vector4 get(int64_t p_index) const;
void set(int64_t p_index, const Vector4 &p_value);
int64_t size() const;
bool is_empty() const;
bool push_back(const Vector4 &p_value);
bool append(const Vector4 &p_value);
void append_array(const PackedVector4Array &p_array);
void remove_at(int64_t p_index);
int64_t insert(int64_t p_at_index, const Vector4 &p_value);
void fill(const Vector4 &p_value);
int64_t resize(int64_t p_new_size);
void clear();
bool has(const Vector4 &p_value) const;
void reverse();
PackedVector4Array slice(int64_t p_begin, int64_t p_end = 2147483647) const;
PackedByteArray to_byte_array() const;
void sort();
int64_t bsearch(const Vector4 &p_value, bool p_before = true) const;
PackedVector4Array duplicate() const;
int64_t find(const Vector4 &p_value, int64_t p_from = 0) const;
int64_t rfind(const Vector4 &p_value, int64_t p_from = -1) const;
int64_t count(const Vector4 &p_value) const;
bool erase(const Vector4 &p_value);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const PackedVector4Array &p_other) const;
bool operator!=(const PackedVector4Array &p_other) const;
PackedVector4Array operator+(const PackedVector4Array &p_other) const;
PackedVector4Array &operator=(const PackedVector4Array &p_other);
PackedVector4Array &operator=(PackedVector4Array &&p_other);
const Vector4 &operator[](int64_t p_index) const;
Vector4 &operator[](int64_t p_index);
const Vector4 *ptr() const;
Vector4 *ptrw();
struct Iterator {
_FORCE_INLINE_ Vector4 &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ Vector4 *operator->() const { return elem_ptr; }
_FORCE_INLINE_ Iterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ Iterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; }
Iterator(Vector4 *p_ptr) { elem_ptr = p_ptr; }
Iterator() {}
Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
Vector4 *elem_ptr = nullptr;
};
struct ConstIterator {
_FORCE_INLINE_ const Vector4 &operator*() const {
return *elem_ptr;
}
_FORCE_INLINE_ const Vector4 *operator->() const { return elem_ptr; }
_FORCE_INLINE_ ConstIterator &operator++() {
elem_ptr++;
return *this;
}
_FORCE_INLINE_ ConstIterator &operator--() {
elem_ptr--;
return *this;
}
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
ConstIterator(const Vector4 *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
private:
const Vector4 *elem_ptr = nullptr;
};
_FORCE_INLINE_ Iterator begin() {
return Iterator(ptrw());
}
_FORCE_INLINE_ Iterator end() {
return Iterator(ptrw() + size());
}
_FORCE_INLINE_ ConstIterator begin() const {
return ConstIterator(ptr());
}
_FORCE_INLINE_ ConstIterator end() const {
return ConstIterator(ptr() + size());
}
_FORCE_INLINE_ PackedVector4Array(std::initializer_list<Vector4> p_init) {
ERR_FAIL_COND(resize(p_init.size()) != 0);
size_t i = 0;
for (const Vector4 &element : p_init) {
set(i++, element);
}
}
};
} // namespace godot
@@ -0,0 +1,96 @@
/**************************************************************************/
/* rid.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Dictionary;
class Variant;
class RID {
static constexpr size_t RID_SIZE = 8;
alignas(8) uint8_t opaque[RID_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrBuiltInMethod method_is_valid;
GDExtensionPtrBuiltInMethod method_get_id;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_equal_RID;
GDExtensionPtrOperatorEvaluator operator_not_equal_RID;
GDExtensionPtrOperatorEvaluator operator_less_RID;
GDExtensionPtrOperatorEvaluator operator_less_equal_RID;
GDExtensionPtrOperatorEvaluator operator_greater_RID;
GDExtensionPtrOperatorEvaluator operator_greater_equal_RID;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
RID(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[RID_SIZE]>(&opaque); }
RID();
RID(const RID &p_from);
RID(RID &&p_other);
bool is_valid() const;
int64_t get_id() const;
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const RID &p_other) const;
bool operator!=(const RID &p_other) const;
bool operator<(const RID &p_other) const;
bool operator<=(const RID &p_other) const;
bool operator>(const RID &p_other) const;
bool operator>=(const RID &p_other) const;
RID &operator=(const RID &p_other);
RID &operator=(RID &&p_other);
};
} // namespace godot
@@ -0,0 +1,112 @@
/**************************************************************************/
/* signal.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <gdextension_interface.h>
namespace godot {
class Array;
class Callable;
class Dictionary;
class Object;
class StringName;
class Variant;
class Signal {
static constexpr size_t SIGNAL_SIZE = 16;
alignas(8) uint8_t opaque[SIGNAL_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_is_null;
GDExtensionPtrBuiltInMethod method_get_object;
GDExtensionPtrBuiltInMethod method_get_object_id;
GDExtensionPtrBuiltInMethod method_get_name;
GDExtensionPtrBuiltInMethod method_connect;
GDExtensionPtrBuiltInMethod method_disconnect;
GDExtensionPtrBuiltInMethod method_is_connected;
GDExtensionPtrBuiltInMethod method_get_connections;
GDExtensionPtrBuiltInMethod method_has_connections;
GDExtensionPtrBuiltInMethod method_emit;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_equal_Signal;
GDExtensionPtrOperatorEvaluator operator_not_equal_Signal;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
Signal(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[SIGNAL_SIZE]>(&opaque); }
Signal();
Signal(const Signal &p_from);
Signal(Object *p_object, const StringName &p_signal);
Signal(Signal &&p_other);
~Signal();
bool is_null() const;
Object *get_object() const;
int64_t get_object_id() const;
StringName get_name() const;
int64_t connect(const Callable &p_callable, int64_t p_flags = 0);
void disconnect(const Callable &p_callable);
bool is_connected(const Callable &p_callable) const;
Array get_connections() const;
bool has_connections() const;
template <typename... Args>
void emit(const Args &...p_args) const;
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
bool operator!() const;
bool operator==(const Signal &p_other) const;
bool operator!=(const Signal &p_other) const;
Signal &operator=(const Signal &p_other);
Signal &operator=(Signal &&p_other);
};
} // namespace godot
@@ -0,0 +1,518 @@
/**************************************************************************/
/* string.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/classes/global_constants.hpp>
#include <godot_cpp/variant/char_string.hpp>
#include <godot_cpp/variant/char_utils.hpp>
#include <gdextension_interface.h>
namespace godot {
struct AABB;
class Array;
struct Basis;
class Callable;
struct Color;
class Dictionary;
class NodePath;
class Object;
class PackedByteArray;
class PackedColorArray;
class PackedFloat32Array;
class PackedFloat64Array;
class PackedInt32Array;
class PackedInt64Array;
class PackedStringArray;
class PackedVector2Array;
class PackedVector3Array;
class PackedVector4Array;
struct Plane;
struct Projection;
struct Quaternion;
class RID;
struct Rect2;
struct Rect2i;
class Signal;
class StringName;
struct Transform2D;
struct Transform3D;
class Variant;
struct Vector2;
struct Vector2i;
struct Vector3;
struct Vector3i;
struct Vector4;
struct Vector4i;
class String {
static constexpr size_t STRING_SIZE = 8;
alignas(8) uint8_t opaque[STRING_SIZE] = {};
friend class Variant;
friend class StringName;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrConstructor constructor_3;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_casecmp_to;
GDExtensionPtrBuiltInMethod method_nocasecmp_to;
GDExtensionPtrBuiltInMethod method_naturalcasecmp_to;
GDExtensionPtrBuiltInMethod method_naturalnocasecmp_to;
GDExtensionPtrBuiltInMethod method_filecasecmp_to;
GDExtensionPtrBuiltInMethod method_filenocasecmp_to;
GDExtensionPtrBuiltInMethod method_length;
GDExtensionPtrBuiltInMethod method_substr;
GDExtensionPtrBuiltInMethod method_get_slice;
GDExtensionPtrBuiltInMethod method_get_slicec;
GDExtensionPtrBuiltInMethod method_get_slice_count;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_findn;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_countn;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_rfindn;
GDExtensionPtrBuiltInMethod method_match;
GDExtensionPtrBuiltInMethod method_matchn;
GDExtensionPtrBuiltInMethod method_begins_with;
GDExtensionPtrBuiltInMethod method_ends_with;
GDExtensionPtrBuiltInMethod method_is_subsequence_of;
GDExtensionPtrBuiltInMethod method_is_subsequence_ofn;
GDExtensionPtrBuiltInMethod method_bigrams;
GDExtensionPtrBuiltInMethod method_similarity;
GDExtensionPtrBuiltInMethod method_format;
GDExtensionPtrBuiltInMethod method_replace;
GDExtensionPtrBuiltInMethod method_replacen;
GDExtensionPtrBuiltInMethod method_replace_char;
GDExtensionPtrBuiltInMethod method_replace_chars;
GDExtensionPtrBuiltInMethod method_remove_char;
GDExtensionPtrBuiltInMethod method_remove_chars;
GDExtensionPtrBuiltInMethod method_repeat;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrBuiltInMethod method_capitalize;
GDExtensionPtrBuiltInMethod method_to_camel_case;
GDExtensionPtrBuiltInMethod method_to_pascal_case;
GDExtensionPtrBuiltInMethod method_to_snake_case;
GDExtensionPtrBuiltInMethod method_to_kebab_case;
GDExtensionPtrBuiltInMethod method_split;
GDExtensionPtrBuiltInMethod method_rsplit;
GDExtensionPtrBuiltInMethod method_split_floats;
GDExtensionPtrBuiltInMethod method_join;
GDExtensionPtrBuiltInMethod method_to_upper;
GDExtensionPtrBuiltInMethod method_to_lower;
GDExtensionPtrBuiltInMethod method_left;
GDExtensionPtrBuiltInMethod method_right;
GDExtensionPtrBuiltInMethod method_strip_edges;
GDExtensionPtrBuiltInMethod method_strip_escapes;
GDExtensionPtrBuiltInMethod method_lstrip;
GDExtensionPtrBuiltInMethod method_rstrip;
GDExtensionPtrBuiltInMethod method_get_extension;
GDExtensionPtrBuiltInMethod method_get_basename;
GDExtensionPtrBuiltInMethod method_path_join;
GDExtensionPtrBuiltInMethod method_unicode_at;
GDExtensionPtrBuiltInMethod method_indent;
GDExtensionPtrBuiltInMethod method_dedent;
GDExtensionPtrBuiltInMethod method_hash;
GDExtensionPtrBuiltInMethod method_md5_text;
GDExtensionPtrBuiltInMethod method_sha1_text;
GDExtensionPtrBuiltInMethod method_sha256_text;
GDExtensionPtrBuiltInMethod method_md5_buffer;
GDExtensionPtrBuiltInMethod method_sha1_buffer;
GDExtensionPtrBuiltInMethod method_sha256_buffer;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_contains;
GDExtensionPtrBuiltInMethod method_containsn;
GDExtensionPtrBuiltInMethod method_is_absolute_path;
GDExtensionPtrBuiltInMethod method_is_relative_path;
GDExtensionPtrBuiltInMethod method_simplify_path;
GDExtensionPtrBuiltInMethod method_get_base_dir;
GDExtensionPtrBuiltInMethod method_get_file;
GDExtensionPtrBuiltInMethod method_xml_escape;
GDExtensionPtrBuiltInMethod method_xml_unescape;
GDExtensionPtrBuiltInMethod method_uri_encode;
GDExtensionPtrBuiltInMethod method_uri_decode;
GDExtensionPtrBuiltInMethod method_uri_file_decode;
GDExtensionPtrBuiltInMethod method_c_escape;
GDExtensionPtrBuiltInMethod method_c_unescape;
GDExtensionPtrBuiltInMethod method_json_escape;
GDExtensionPtrBuiltInMethod method_validate_node_name;
GDExtensionPtrBuiltInMethod method_validate_filename;
GDExtensionPtrBuiltInMethod method_is_valid_ascii_identifier;
GDExtensionPtrBuiltInMethod method_is_valid_unicode_identifier;
GDExtensionPtrBuiltInMethod method_is_valid_identifier;
GDExtensionPtrBuiltInMethod method_is_valid_int;
GDExtensionPtrBuiltInMethod method_is_valid_float;
GDExtensionPtrBuiltInMethod method_is_valid_hex_number;
GDExtensionPtrBuiltInMethod method_is_valid_html_color;
GDExtensionPtrBuiltInMethod method_is_valid_ip_address;
GDExtensionPtrBuiltInMethod method_is_valid_filename;
GDExtensionPtrBuiltInMethod method_to_int;
GDExtensionPtrBuiltInMethod method_to_float;
GDExtensionPtrBuiltInMethod method_hex_to_int;
GDExtensionPtrBuiltInMethod method_bin_to_int;
GDExtensionPtrBuiltInMethod method_lpad;
GDExtensionPtrBuiltInMethod method_rpad;
GDExtensionPtrBuiltInMethod method_pad_decimals;
GDExtensionPtrBuiltInMethod method_pad_zeros;
GDExtensionPtrBuiltInMethod method_trim_prefix;
GDExtensionPtrBuiltInMethod method_trim_suffix;
GDExtensionPtrBuiltInMethod method_to_ascii_buffer;
GDExtensionPtrBuiltInMethod method_to_utf8_buffer;
GDExtensionPtrBuiltInMethod method_to_utf16_buffer;
GDExtensionPtrBuiltInMethod method_to_utf32_buffer;
GDExtensionPtrBuiltInMethod method_to_wchar_buffer;
GDExtensionPtrBuiltInMethod method_to_multibyte_char_buffer;
GDExtensionPtrBuiltInMethod method_hex_decode;
GDExtensionPtrBuiltInMethod method_num_scientific;
GDExtensionPtrBuiltInMethod method_num;
GDExtensionPtrBuiltInMethod method_num_int64;
GDExtensionPtrBuiltInMethod method_num_uint64;
GDExtensionPtrBuiltInMethod method_chr;
GDExtensionPtrBuiltInMethod method_humanize_size;
GDExtensionPtrIndexedSetter indexed_setter;
GDExtensionPtrIndexedGetter indexed_getter;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_module_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_module_bool;
GDExtensionPtrOperatorEvaluator operator_module_int;
GDExtensionPtrOperatorEvaluator operator_module_float;
GDExtensionPtrOperatorEvaluator operator_equal_String;
GDExtensionPtrOperatorEvaluator operator_not_equal_String;
GDExtensionPtrOperatorEvaluator operator_less_String;
GDExtensionPtrOperatorEvaluator operator_less_equal_String;
GDExtensionPtrOperatorEvaluator operator_greater_String;
GDExtensionPtrOperatorEvaluator operator_greater_equal_String;
GDExtensionPtrOperatorEvaluator operator_add_String;
GDExtensionPtrOperatorEvaluator operator_module_String;
GDExtensionPtrOperatorEvaluator operator_in_String;
GDExtensionPtrOperatorEvaluator operator_module_Vector2;
GDExtensionPtrOperatorEvaluator operator_module_Vector2i;
GDExtensionPtrOperatorEvaluator operator_module_Rect2;
GDExtensionPtrOperatorEvaluator operator_module_Rect2i;
GDExtensionPtrOperatorEvaluator operator_module_Vector3;
GDExtensionPtrOperatorEvaluator operator_module_Vector3i;
GDExtensionPtrOperatorEvaluator operator_module_Transform2D;
GDExtensionPtrOperatorEvaluator operator_module_Vector4;
GDExtensionPtrOperatorEvaluator operator_module_Vector4i;
GDExtensionPtrOperatorEvaluator operator_module_Plane;
GDExtensionPtrOperatorEvaluator operator_module_Quaternion;
GDExtensionPtrOperatorEvaluator operator_module_AABB;
GDExtensionPtrOperatorEvaluator operator_module_Basis;
GDExtensionPtrOperatorEvaluator operator_module_Transform3D;
GDExtensionPtrOperatorEvaluator operator_module_Projection;
GDExtensionPtrOperatorEvaluator operator_module_Color;
GDExtensionPtrOperatorEvaluator operator_equal_StringName;
GDExtensionPtrOperatorEvaluator operator_not_equal_StringName;
GDExtensionPtrOperatorEvaluator operator_add_StringName;
GDExtensionPtrOperatorEvaluator operator_module_StringName;
GDExtensionPtrOperatorEvaluator operator_in_StringName;
GDExtensionPtrOperatorEvaluator operator_module_NodePath;
GDExtensionPtrOperatorEvaluator operator_module_RID;
GDExtensionPtrOperatorEvaluator operator_module_Object;
GDExtensionPtrOperatorEvaluator operator_in_Object;
GDExtensionPtrOperatorEvaluator operator_module_Callable;
GDExtensionPtrOperatorEvaluator operator_module_Signal;
GDExtensionPtrOperatorEvaluator operator_module_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_module_Array;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedByteArray;
GDExtensionPtrOperatorEvaluator operator_module_PackedInt32Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedInt64Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedFloat32Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedFloat64Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedStringArray;
GDExtensionPtrOperatorEvaluator operator_in_PackedStringArray;
GDExtensionPtrOperatorEvaluator operator_module_PackedVector2Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedVector3Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedColorArray;
GDExtensionPtrOperatorEvaluator operator_module_PackedVector4Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
String(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[STRING_SIZE]>(&opaque); }
String();
String(const String &p_from);
String(const StringName &p_from);
String(const NodePath &p_from);
String(String &&p_other);
String(const char *p_from);
String(const wchar_t *p_from);
String(const char16_t *p_from);
String(const char32_t *p_from);
~String();
int64_t casecmp_to(const String &p_to) const;
int64_t nocasecmp_to(const String &p_to) const;
int64_t naturalcasecmp_to(const String &p_to) const;
int64_t naturalnocasecmp_to(const String &p_to) const;
int64_t filecasecmp_to(const String &p_to) const;
int64_t filenocasecmp_to(const String &p_to) const;
int64_t length() const;
String substr(int64_t p_from, int64_t p_len = -1) const;
String get_slice(const String &p_delimiter, int64_t p_slice) const;
String get_slicec(int64_t p_delimiter, int64_t p_slice) const;
int64_t get_slice_count(const String &p_delimiter) const;
int64_t find(const String &p_what, int64_t p_from = 0) const;
int64_t findn(const String &p_what, int64_t p_from = 0) const;
int64_t count(const String &p_what, int64_t p_from = 0, int64_t p_to = 0) const;
int64_t countn(const String &p_what, int64_t p_from = 0, int64_t p_to = 0) const;
int64_t rfind(const String &p_what, int64_t p_from = -1) const;
int64_t rfindn(const String &p_what, int64_t p_from = -1) const;
bool match(const String &p_expr) const;
bool matchn(const String &p_expr) const;
bool begins_with(const String &p_text) const;
bool ends_with(const String &p_text) const;
bool is_subsequence_of(const String &p_text) const;
bool is_subsequence_ofn(const String &p_text) const;
PackedStringArray bigrams() const;
double similarity(const String &p_text) const;
String format(const Variant &p_values, const String &p_placeholder = "{_}") const;
String replace(const String &p_what, const String &p_forwhat) const;
String replacen(const String &p_what, const String &p_forwhat) const;
String replace_char(int64_t p_key, int64_t p_with) const;
String replace_chars(const String &p_keys, int64_t p_with) const;
String remove_char(int64_t p_what) const;
String remove_chars(const String &p_chars) const;
String repeat(int64_t p_count) const;
String reverse() const;
String insert(int64_t p_position, const String &p_what) const;
String erase(int64_t p_position, int64_t p_chars = 1) const;
String capitalize() const;
String to_camel_case() const;
String to_pascal_case() const;
String to_snake_case() const;
String to_kebab_case() const;
PackedStringArray split(const String &p_delimiter = String(), bool p_allow_empty = true, int64_t p_maxsplit = 0) const;
PackedStringArray rsplit(const String &p_delimiter = String(), bool p_allow_empty = true, int64_t p_maxsplit = 0) const;
PackedFloat64Array split_floats(const String &p_delimiter, bool p_allow_empty = true) const;
String join(const PackedStringArray &p_parts) const;
String to_upper() const;
String to_lower() const;
String left(int64_t p_length) const;
String right(int64_t p_length) const;
String strip_edges(bool p_left = true, bool p_right = true) const;
String strip_escapes() const;
String lstrip(const String &p_chars) const;
String rstrip(const String &p_chars) const;
String get_extension() const;
String get_basename() const;
String path_join(const String &p_path) const;
int64_t unicode_at(int64_t p_at) const;
String indent(const String &p_prefix) const;
String dedent() const;
int64_t hash() const;
String md5_text() const;
String sha1_text() const;
String sha256_text() const;
PackedByteArray md5_buffer() const;
PackedByteArray sha1_buffer() const;
PackedByteArray sha256_buffer() const;
bool is_empty() const;
bool contains(const String &p_what) const;
bool containsn(const String &p_what) const;
bool is_absolute_path() const;
bool is_relative_path() const;
String simplify_path() const;
String get_base_dir() const;
String get_file() const;
String xml_escape(bool p_escape_quotes = false) const;
String xml_unescape() const;
String uri_encode() const;
String uri_decode() const;
String uri_file_decode() const;
String c_escape() const;
String c_unescape() const;
String json_escape() const;
String validate_node_name() const;
String validate_filename() const;
bool is_valid_ascii_identifier() const;
bool is_valid_unicode_identifier() const;
bool is_valid_identifier() const;
bool is_valid_int() const;
bool is_valid_float() const;
bool is_valid_hex_number(bool p_with_prefix = false) const;
bool is_valid_html_color() const;
bool is_valid_ip_address() const;
bool is_valid_filename() const;
int64_t to_int() const;
double to_float() const;
int64_t hex_to_int() const;
int64_t bin_to_int() const;
String lpad(int64_t p_min_length, const String &p_character = " ") const;
String rpad(int64_t p_min_length, const String &p_character = " ") const;
String pad_decimals(int64_t p_digits) const;
String pad_zeros(int64_t p_digits) const;
String trim_prefix(const String &p_prefix) const;
String trim_suffix(const String &p_suffix) const;
PackedByteArray to_ascii_buffer() const;
PackedByteArray to_utf8_buffer() const;
PackedByteArray to_utf16_buffer() const;
PackedByteArray to_utf32_buffer() const;
PackedByteArray to_wchar_buffer() const;
PackedByteArray to_multibyte_char_buffer(const String &p_encoding = String()) const;
PackedByteArray hex_decode() const;
static String num_scientific(double p_number);
static String num(double p_number, int64_t p_decimals = -1);
static String num_int64(int64_t p_number, int64_t p_base = 10, bool p_capitalize_hex = false);
static String num_uint64(int64_t p_number, int64_t p_base = 10, bool p_capitalize_hex = false);
static String chr(int64_t p_code);
static String humanize_size(int64_t p_size);
static String utf8(const char *p_from, int64_t p_len = -1);
Error parse_utf8(const char *p_from, int64_t p_len = -1);
static String utf16(const char16_t *p_from, int64_t p_len = -1);
Error parse_utf16(const char16_t *p_from, int64_t p_len = -1, bool p_default_little_endian = true);
CharString utf8() const;
CharString ascii() const;
Char16String utf16() const;
Char32String utf32() const;
CharWideString wide_string() const;
static String num_real(double p_num, bool p_trailing = true);
Error resize(int64_t p_size);
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
String operator%(const Variant &p_other) const;
bool operator!() const;
String operator%(bool p_other) const;
String operator%(int64_t p_other) const;
String operator%(double p_other) const;
bool operator==(const String &p_other) const;
bool operator!=(const String &p_other) const;
bool operator<(const String &p_other) const;
bool operator<=(const String &p_other) const;
bool operator>(const String &p_other) const;
bool operator>=(const String &p_other) const;
String operator+(const String &p_other) const;
String operator%(const String &p_other) const;
String operator%(const Vector2 &p_other) const;
String operator%(const Vector2i &p_other) const;
String operator%(const Rect2 &p_other) const;
String operator%(const Rect2i &p_other) const;
String operator%(const Vector3 &p_other) const;
String operator%(const Vector3i &p_other) const;
String operator%(const Transform2D &p_other) const;
String operator%(const Vector4 &p_other) const;
String operator%(const Vector4i &p_other) const;
String operator%(const Plane &p_other) const;
String operator%(const Quaternion &p_other) const;
String operator%(const AABB &p_other) const;
String operator%(const Basis &p_other) const;
String operator%(const Transform3D &p_other) const;
String operator%(const Projection &p_other) const;
String operator%(const Color &p_other) const;
bool operator==(const StringName &p_other) const;
bool operator!=(const StringName &p_other) const;
String operator+(const StringName &p_other) const;
String operator%(const StringName &p_other) const;
String operator%(const NodePath &p_other) const;
String operator%(const RID &p_other) const;
String operator%(Object *p_other) const;
String operator%(const Callable &p_other) const;
String operator%(const Signal &p_other) const;
String operator%(const Dictionary &p_other) const;
String operator%(const Array &p_other) const;
String operator%(const PackedByteArray &p_other) const;
String operator%(const PackedInt32Array &p_other) const;
String operator%(const PackedInt64Array &p_other) const;
String operator%(const PackedFloat32Array &p_other) const;
String operator%(const PackedFloat64Array &p_other) const;
String operator%(const PackedStringArray &p_other) const;
String operator%(const PackedVector2Array &p_other) const;
String operator%(const PackedVector3Array &p_other) const;
String operator%(const PackedColorArray &p_other) const;
String operator%(const PackedVector4Array &p_other) const;
String &operator=(const String &p_other);
String &operator=(String &&p_other);
String &operator=(const char *p_str);
String &operator=(const wchar_t *p_str);
String &operator=(const char16_t *p_str);
String &operator=(const char32_t *p_str);
bool operator==(const char *p_str) const;
bool operator==(const wchar_t *p_str) const;
bool operator==(const char16_t *p_str) const;
bool operator==(const char32_t *p_str) const;
bool operator!=(const char *p_str) const;
bool operator!=(const wchar_t *p_str) const;
bool operator!=(const char16_t *p_str) const;
bool operator!=(const char32_t *p_str) const;
String operator+(const char *p_str);
String operator+(const wchar_t *p_str);
String operator+(const char16_t *p_str);
String operator+(const char32_t *p_str);
String operator+(char32_t p_char);
String &operator+=(const String &p_str);
String &operator+=(char32_t p_char);
String &operator+=(const char *p_str);
String &operator+=(const wchar_t *p_str);
String &operator+=(const char32_t *p_str);
const char32_t &operator[](int64_t p_index) const;
char32_t &operator[](int64_t p_index);
const char32_t *ptr() const;
char32_t *ptrw();
};
bool operator==(const char *p_chr, const String &p_str);
bool operator==(const wchar_t *p_chr, const String &p_str);
bool operator==(const char16_t *p_chr, const String &p_str);
bool operator==(const char32_t *p_chr, const String &p_str);
bool operator!=(const char *p_chr, const String &p_str);
bool operator!=(const wchar_t *p_chr, const String &p_str);
bool operator!=(const char16_t *p_chr, const String &p_str);
bool operator!=(const char32_t *p_chr, const String &p_str);
String operator+(const char *p_chr, const String &p_str);
String operator+(const wchar_t *p_chr, const String &p_str);
String operator+(const char16_t *p_chr, const String &p_str);
String operator+(const char32_t *p_chr, const String &p_str);
String operator+(char32_t p_char, const String &p_str);
String itos(int64_t p_val);
String uitos(uint64_t p_val);
String rtos(double p_val);
String rtoss(double p_val);
} // namespace godot
@@ -0,0 +1,443 @@
/**************************************************************************/
/* string_name.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/core/math_defs.hpp>
#include <godot_cpp/variant/string.hpp>
#include <gdextension_interface.h>
namespace godot {
struct AABB;
class Array;
struct Basis;
class Callable;
struct Color;
class Dictionary;
class NodePath;
class Object;
class PackedByteArray;
class PackedColorArray;
class PackedFloat32Array;
class PackedFloat64Array;
class PackedInt32Array;
class PackedInt64Array;
class PackedStringArray;
class PackedVector2Array;
class PackedVector3Array;
class PackedVector4Array;
struct Plane;
struct Projection;
struct Quaternion;
class RID;
struct Rect2;
struct Rect2i;
class Signal;
struct Transform2D;
struct Transform3D;
class Variant;
struct Vector2;
struct Vector2i;
struct Vector3;
struct Vector3i;
struct Vector4;
struct Vector4i;
class StringName {
static constexpr size_t STRING_NAME_SIZE = 8;
alignas(8) uint8_t opaque[STRING_NAME_SIZE] = {};
friend class Variant;
static struct _MethodBindings {
GDExtensionTypeFromVariantConstructorFunc from_variant_constructor;
GDExtensionPtrConstructor constructor_0;
GDExtensionPtrConstructor constructor_1;
GDExtensionPtrConstructor constructor_2;
GDExtensionPtrDestructor destructor;
GDExtensionPtrBuiltInMethod method_casecmp_to;
GDExtensionPtrBuiltInMethod method_nocasecmp_to;
GDExtensionPtrBuiltInMethod method_naturalcasecmp_to;
GDExtensionPtrBuiltInMethod method_naturalnocasecmp_to;
GDExtensionPtrBuiltInMethod method_filecasecmp_to;
GDExtensionPtrBuiltInMethod method_filenocasecmp_to;
GDExtensionPtrBuiltInMethod method_length;
GDExtensionPtrBuiltInMethod method_substr;
GDExtensionPtrBuiltInMethod method_get_slice;
GDExtensionPtrBuiltInMethod method_get_slicec;
GDExtensionPtrBuiltInMethod method_get_slice_count;
GDExtensionPtrBuiltInMethod method_find;
GDExtensionPtrBuiltInMethod method_findn;
GDExtensionPtrBuiltInMethod method_count;
GDExtensionPtrBuiltInMethod method_countn;
GDExtensionPtrBuiltInMethod method_rfind;
GDExtensionPtrBuiltInMethod method_rfindn;
GDExtensionPtrBuiltInMethod method_match;
GDExtensionPtrBuiltInMethod method_matchn;
GDExtensionPtrBuiltInMethod method_begins_with;
GDExtensionPtrBuiltInMethod method_ends_with;
GDExtensionPtrBuiltInMethod method_is_subsequence_of;
GDExtensionPtrBuiltInMethod method_is_subsequence_ofn;
GDExtensionPtrBuiltInMethod method_bigrams;
GDExtensionPtrBuiltInMethod method_similarity;
GDExtensionPtrBuiltInMethod method_format;
GDExtensionPtrBuiltInMethod method_replace;
GDExtensionPtrBuiltInMethod method_replacen;
GDExtensionPtrBuiltInMethod method_replace_char;
GDExtensionPtrBuiltInMethod method_replace_chars;
GDExtensionPtrBuiltInMethod method_remove_char;
GDExtensionPtrBuiltInMethod method_remove_chars;
GDExtensionPtrBuiltInMethod method_repeat;
GDExtensionPtrBuiltInMethod method_reverse;
GDExtensionPtrBuiltInMethod method_insert;
GDExtensionPtrBuiltInMethod method_erase;
GDExtensionPtrBuiltInMethod method_capitalize;
GDExtensionPtrBuiltInMethod method_to_camel_case;
GDExtensionPtrBuiltInMethod method_to_pascal_case;
GDExtensionPtrBuiltInMethod method_to_snake_case;
GDExtensionPtrBuiltInMethod method_to_kebab_case;
GDExtensionPtrBuiltInMethod method_split;
GDExtensionPtrBuiltInMethod method_rsplit;
GDExtensionPtrBuiltInMethod method_split_floats;
GDExtensionPtrBuiltInMethod method_join;
GDExtensionPtrBuiltInMethod method_to_upper;
GDExtensionPtrBuiltInMethod method_to_lower;
GDExtensionPtrBuiltInMethod method_left;
GDExtensionPtrBuiltInMethod method_right;
GDExtensionPtrBuiltInMethod method_strip_edges;
GDExtensionPtrBuiltInMethod method_strip_escapes;
GDExtensionPtrBuiltInMethod method_lstrip;
GDExtensionPtrBuiltInMethod method_rstrip;
GDExtensionPtrBuiltInMethod method_get_extension;
GDExtensionPtrBuiltInMethod method_get_basename;
GDExtensionPtrBuiltInMethod method_path_join;
GDExtensionPtrBuiltInMethod method_unicode_at;
GDExtensionPtrBuiltInMethod method_indent;
GDExtensionPtrBuiltInMethod method_dedent;
GDExtensionPtrBuiltInMethod method_md5_text;
GDExtensionPtrBuiltInMethod method_sha1_text;
GDExtensionPtrBuiltInMethod method_sha256_text;
GDExtensionPtrBuiltInMethod method_md5_buffer;
GDExtensionPtrBuiltInMethod method_sha1_buffer;
GDExtensionPtrBuiltInMethod method_sha256_buffer;
GDExtensionPtrBuiltInMethod method_is_empty;
GDExtensionPtrBuiltInMethod method_contains;
GDExtensionPtrBuiltInMethod method_containsn;
GDExtensionPtrBuiltInMethod method_is_absolute_path;
GDExtensionPtrBuiltInMethod method_is_relative_path;
GDExtensionPtrBuiltInMethod method_simplify_path;
GDExtensionPtrBuiltInMethod method_get_base_dir;
GDExtensionPtrBuiltInMethod method_get_file;
GDExtensionPtrBuiltInMethod method_xml_escape;
GDExtensionPtrBuiltInMethod method_xml_unescape;
GDExtensionPtrBuiltInMethod method_uri_encode;
GDExtensionPtrBuiltInMethod method_uri_decode;
GDExtensionPtrBuiltInMethod method_uri_file_decode;
GDExtensionPtrBuiltInMethod method_c_escape;
GDExtensionPtrBuiltInMethod method_c_unescape;
GDExtensionPtrBuiltInMethod method_json_escape;
GDExtensionPtrBuiltInMethod method_validate_node_name;
GDExtensionPtrBuiltInMethod method_validate_filename;
GDExtensionPtrBuiltInMethod method_is_valid_ascii_identifier;
GDExtensionPtrBuiltInMethod method_is_valid_unicode_identifier;
GDExtensionPtrBuiltInMethod method_is_valid_identifier;
GDExtensionPtrBuiltInMethod method_is_valid_int;
GDExtensionPtrBuiltInMethod method_is_valid_float;
GDExtensionPtrBuiltInMethod method_is_valid_hex_number;
GDExtensionPtrBuiltInMethod method_is_valid_html_color;
GDExtensionPtrBuiltInMethod method_is_valid_ip_address;
GDExtensionPtrBuiltInMethod method_is_valid_filename;
GDExtensionPtrBuiltInMethod method_to_int;
GDExtensionPtrBuiltInMethod method_to_float;
GDExtensionPtrBuiltInMethod method_hex_to_int;
GDExtensionPtrBuiltInMethod method_bin_to_int;
GDExtensionPtrBuiltInMethod method_lpad;
GDExtensionPtrBuiltInMethod method_rpad;
GDExtensionPtrBuiltInMethod method_pad_decimals;
GDExtensionPtrBuiltInMethod method_pad_zeros;
GDExtensionPtrBuiltInMethod method_trim_prefix;
GDExtensionPtrBuiltInMethod method_trim_suffix;
GDExtensionPtrBuiltInMethod method_to_ascii_buffer;
GDExtensionPtrBuiltInMethod method_to_utf8_buffer;
GDExtensionPtrBuiltInMethod method_to_utf16_buffer;
GDExtensionPtrBuiltInMethod method_to_utf32_buffer;
GDExtensionPtrBuiltInMethod method_to_wchar_buffer;
GDExtensionPtrBuiltInMethod method_to_multibyte_char_buffer;
GDExtensionPtrBuiltInMethod method_hex_decode;
GDExtensionPtrBuiltInMethod method_hash;
GDExtensionPtrOperatorEvaluator operator_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_not_equal_Variant;
GDExtensionPtrOperatorEvaluator operator_module_Variant;
GDExtensionPtrOperatorEvaluator operator_not;
GDExtensionPtrOperatorEvaluator operator_module_bool;
GDExtensionPtrOperatorEvaluator operator_module_int;
GDExtensionPtrOperatorEvaluator operator_module_float;
GDExtensionPtrOperatorEvaluator operator_equal_String;
GDExtensionPtrOperatorEvaluator operator_not_equal_String;
GDExtensionPtrOperatorEvaluator operator_add_String;
GDExtensionPtrOperatorEvaluator operator_module_String;
GDExtensionPtrOperatorEvaluator operator_in_String;
GDExtensionPtrOperatorEvaluator operator_module_Vector2;
GDExtensionPtrOperatorEvaluator operator_module_Vector2i;
GDExtensionPtrOperatorEvaluator operator_module_Rect2;
GDExtensionPtrOperatorEvaluator operator_module_Rect2i;
GDExtensionPtrOperatorEvaluator operator_module_Vector3;
GDExtensionPtrOperatorEvaluator operator_module_Vector3i;
GDExtensionPtrOperatorEvaluator operator_module_Transform2D;
GDExtensionPtrOperatorEvaluator operator_module_Vector4;
GDExtensionPtrOperatorEvaluator operator_module_Vector4i;
GDExtensionPtrOperatorEvaluator operator_module_Plane;
GDExtensionPtrOperatorEvaluator operator_module_Quaternion;
GDExtensionPtrOperatorEvaluator operator_module_AABB;
GDExtensionPtrOperatorEvaluator operator_module_Basis;
GDExtensionPtrOperatorEvaluator operator_module_Transform3D;
GDExtensionPtrOperatorEvaluator operator_module_Projection;
GDExtensionPtrOperatorEvaluator operator_module_Color;
GDExtensionPtrOperatorEvaluator operator_equal_StringName;
GDExtensionPtrOperatorEvaluator operator_not_equal_StringName;
GDExtensionPtrOperatorEvaluator operator_less_StringName;
GDExtensionPtrOperatorEvaluator operator_less_equal_StringName;
GDExtensionPtrOperatorEvaluator operator_greater_StringName;
GDExtensionPtrOperatorEvaluator operator_greater_equal_StringName;
GDExtensionPtrOperatorEvaluator operator_add_StringName;
GDExtensionPtrOperatorEvaluator operator_module_StringName;
GDExtensionPtrOperatorEvaluator operator_in_StringName;
GDExtensionPtrOperatorEvaluator operator_module_NodePath;
GDExtensionPtrOperatorEvaluator operator_module_RID;
GDExtensionPtrOperatorEvaluator operator_module_Object;
GDExtensionPtrOperatorEvaluator operator_in_Object;
GDExtensionPtrOperatorEvaluator operator_module_Callable;
GDExtensionPtrOperatorEvaluator operator_module_Signal;
GDExtensionPtrOperatorEvaluator operator_module_Dictionary;
GDExtensionPtrOperatorEvaluator operator_in_Dictionary;
GDExtensionPtrOperatorEvaluator operator_module_Array;
GDExtensionPtrOperatorEvaluator operator_in_Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedByteArray;
GDExtensionPtrOperatorEvaluator operator_module_PackedInt32Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedInt64Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedFloat32Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedFloat64Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedStringArray;
GDExtensionPtrOperatorEvaluator operator_in_PackedStringArray;
GDExtensionPtrOperatorEvaluator operator_module_PackedVector2Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedVector3Array;
GDExtensionPtrOperatorEvaluator operator_module_PackedColorArray;
GDExtensionPtrOperatorEvaluator operator_module_PackedVector4Array;
} _method_bindings;
static void init_bindings();
static void _init_bindings_constructors_destructor();
StringName(const Variant *p_variant);
public:
_FORCE_INLINE_ GDExtensionTypePtr _native_ptr() const { return const_cast<uint8_t(*)[STRING_NAME_SIZE]>(&opaque); }
StringName();
StringName(const StringName &p_from);
StringName(const String &p_from);
StringName(StringName &&p_other);
StringName(const char *p_from, bool p_static = false);
StringName(const wchar_t *p_from);
StringName(const char16_t *p_from);
StringName(const char32_t *p_from);
~StringName();
int64_t casecmp_to(const String &p_to) const;
int64_t nocasecmp_to(const String &p_to) const;
int64_t naturalcasecmp_to(const String &p_to) const;
int64_t naturalnocasecmp_to(const String &p_to) const;
int64_t filecasecmp_to(const String &p_to) const;
int64_t filenocasecmp_to(const String &p_to) const;
int64_t length() const;
String substr(int64_t p_from, int64_t p_len = -1) const;
String get_slice(const String &p_delimiter, int64_t p_slice) const;
String get_slicec(int64_t p_delimiter, int64_t p_slice) const;
int64_t get_slice_count(const String &p_delimiter) const;
int64_t find(const String &p_what, int64_t p_from = 0) const;
int64_t findn(const String &p_what, int64_t p_from = 0) const;
int64_t count(const String &p_what, int64_t p_from = 0, int64_t p_to = 0) const;
int64_t countn(const String &p_what, int64_t p_from = 0, int64_t p_to = 0) const;
int64_t rfind(const String &p_what, int64_t p_from = -1) const;
int64_t rfindn(const String &p_what, int64_t p_from = -1) const;
bool match(const String &p_expr) const;
bool matchn(const String &p_expr) const;
bool begins_with(const String &p_text) const;
bool ends_with(const String &p_text) const;
bool is_subsequence_of(const String &p_text) const;
bool is_subsequence_ofn(const String &p_text) const;
PackedStringArray bigrams() const;
double similarity(const String &p_text) const;
String format(const Variant &p_values, const String &p_placeholder = "{_}") const;
String replace(const String &p_what, const String &p_forwhat) const;
String replacen(const String &p_what, const String &p_forwhat) const;
String replace_char(int64_t p_key, int64_t p_with) const;
String replace_chars(const String &p_keys, int64_t p_with) const;
String remove_char(int64_t p_what) const;
String remove_chars(const String &p_chars) const;
String repeat(int64_t p_count) const;
String reverse() const;
String insert(int64_t p_position, const String &p_what) const;
String erase(int64_t p_position, int64_t p_chars = 1) const;
String capitalize() const;
String to_camel_case() const;
String to_pascal_case() const;
String to_snake_case() const;
String to_kebab_case() const;
PackedStringArray split(const String &p_delimiter = String(), bool p_allow_empty = true, int64_t p_maxsplit = 0) const;
PackedStringArray rsplit(const String &p_delimiter = String(), bool p_allow_empty = true, int64_t p_maxsplit = 0) const;
PackedFloat64Array split_floats(const String &p_delimiter, bool p_allow_empty = true) const;
String join(const PackedStringArray &p_parts) const;
String to_upper() const;
String to_lower() const;
String left(int64_t p_length) const;
String right(int64_t p_length) const;
String strip_edges(bool p_left = true, bool p_right = true) const;
String strip_escapes() const;
String lstrip(const String &p_chars) const;
String rstrip(const String &p_chars) const;
String get_extension() const;
String get_basename() const;
String path_join(const String &p_path) const;
int64_t unicode_at(int64_t p_at) const;
String indent(const String &p_prefix) const;
String dedent() const;
String md5_text() const;
String sha1_text() const;
String sha256_text() const;
PackedByteArray md5_buffer() const;
PackedByteArray sha1_buffer() const;
PackedByteArray sha256_buffer() const;
bool is_empty() const;
bool contains(const String &p_what) const;
bool containsn(const String &p_what) const;
bool is_absolute_path() const;
bool is_relative_path() const;
String simplify_path() const;
String get_base_dir() const;
String get_file() const;
String xml_escape(bool p_escape_quotes = false) const;
String xml_unescape() const;
String uri_encode() const;
String uri_decode() const;
String uri_file_decode() const;
String c_escape() const;
String c_unescape() const;
String json_escape() const;
String validate_node_name() const;
String validate_filename() const;
bool is_valid_ascii_identifier() const;
bool is_valid_unicode_identifier() const;
bool is_valid_identifier() const;
bool is_valid_int() const;
bool is_valid_float() const;
bool is_valid_hex_number(bool p_with_prefix = false) const;
bool is_valid_html_color() const;
bool is_valid_ip_address() const;
bool is_valid_filename() const;
int64_t to_int() const;
double to_float() const;
int64_t hex_to_int() const;
int64_t bin_to_int() const;
String lpad(int64_t p_min_length, const String &p_character = " ") const;
String rpad(int64_t p_min_length, const String &p_character = " ") const;
String pad_decimals(int64_t p_digits) const;
String pad_zeros(int64_t p_digits) const;
String trim_prefix(const String &p_prefix) const;
String trim_suffix(const String &p_suffix) const;
PackedByteArray to_ascii_buffer() const;
PackedByteArray to_utf8_buffer() const;
PackedByteArray to_utf16_buffer() const;
PackedByteArray to_utf32_buffer() const;
PackedByteArray to_wchar_buffer() const;
PackedByteArray to_multibyte_char_buffer(const String &p_encoding = String()) const;
PackedByteArray hex_decode() const;
int64_t hash() const;
bool operator==(const Variant &p_other) const;
bool operator!=(const Variant &p_other) const;
String operator%(const Variant &p_other) const;
bool operator!() const;
String operator%(bool p_other) const;
String operator%(int64_t p_other) const;
String operator%(double p_other) const;
bool operator==(const String &p_other) const;
bool operator!=(const String &p_other) const;
String operator+(const String &p_other) const;
String operator%(const String &p_other) const;
String operator%(const Vector2 &p_other) const;
String operator%(const Vector2i &p_other) const;
String operator%(const Rect2 &p_other) const;
String operator%(const Rect2i &p_other) const;
String operator%(const Vector3 &p_other) const;
String operator%(const Vector3i &p_other) const;
String operator%(const Transform2D &p_other) const;
String operator%(const Vector4 &p_other) const;
String operator%(const Vector4i &p_other) const;
String operator%(const Plane &p_other) const;
String operator%(const Quaternion &p_other) const;
String operator%(const AABB &p_other) const;
String operator%(const Basis &p_other) const;
String operator%(const Transform3D &p_other) const;
String operator%(const Projection &p_other) const;
String operator%(const Color &p_other) const;
bool operator==(const StringName &p_other) const;
bool operator!=(const StringName &p_other) const;
bool operator<(const StringName &p_other) const;
bool operator<=(const StringName &p_other) const;
bool operator>(const StringName &p_other) const;
bool operator>=(const StringName &p_other) const;
String operator+(const StringName &p_other) const;
String operator%(const StringName &p_other) const;
String operator%(const NodePath &p_other) const;
String operator%(const RID &p_other) const;
String operator%(Object *p_other) const;
String operator%(const Callable &p_other) const;
String operator%(const Signal &p_other) const;
String operator%(const Dictionary &p_other) const;
String operator%(const Array &p_other) const;
String operator%(const PackedByteArray &p_other) const;
String operator%(const PackedInt32Array &p_other) const;
String operator%(const PackedInt64Array &p_other) const;
String operator%(const PackedFloat32Array &p_other) const;
String operator%(const PackedFloat64Array &p_other) const;
String operator%(const PackedStringArray &p_other) const;
String operator%(const PackedVector2Array &p_other) const;
String operator%(const PackedVector3Array &p_other) const;
String operator%(const PackedColorArray &p_other) const;
String operator%(const PackedVector4Array &p_other) const;
StringName &operator=(const StringName &p_other);
StringName &operator=(StringName &&p_other);
};
} // namespace godot
@@ -0,0 +1,315 @@
/**************************************************************************/
/* utility_functions.hpp */
/**************************************************************************/
/* 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.
#pragma once
#include <godot_cpp/variant/builtin_types.hpp>
#include <godot_cpp/variant/variant.hpp>
#include <array>
namespace godot {
class UtilityFunctions {
public:
static double sin(double p_angle_rad);
static double cos(double p_angle_rad);
static double tan(double p_angle_rad);
static double sinh(double p_x);
static double cosh(double p_x);
static double tanh(double p_x);
static double asin(double p_x);
static double acos(double p_x);
static double atan(double p_x);
static double atan2(double p_y, double p_x);
static double asinh(double p_x);
static double acosh(double p_x);
static double atanh(double p_x);
static double sqrt(double p_x);
static double fmod(double p_x, double p_y);
static double fposmod(double p_x, double p_y);
static int64_t posmod(int64_t p_x, int64_t p_y);
static Variant floor(const Variant &p_x);
static double floorf(double p_x);
static int64_t floori(double p_x);
static Variant ceil(const Variant &p_x);
static double ceilf(double p_x);
static int64_t ceili(double p_x);
static Variant round(const Variant &p_x);
static double roundf(double p_x);
static int64_t roundi(double p_x);
static Variant abs(const Variant &p_x);
static double absf(double p_x);
static int64_t absi(int64_t p_x);
static Variant sign(const Variant &p_x);
static double signf(double p_x);
static int64_t signi(int64_t p_x);
static Variant snapped(const Variant &p_x, const Variant &p_step);
static double snappedf(double p_x, double p_step);
static int64_t snappedi(double p_x, int64_t p_step);
static double pow(double p_base, double p_exp);
static double log(double p_x);
static double exp(double p_x);
static bool is_nan(double p_x);
static bool is_inf(double p_x);
static bool is_equal_approx(double p_a, double p_b);
static bool is_zero_approx(double p_x);
static bool is_finite(double p_x);
static double ease(double p_x, double p_curve);
static int64_t step_decimals(double p_x);
static Variant lerp(const Variant &p_from, const Variant &p_to, const Variant &p_weight);
static double lerpf(double p_from, double p_to, double p_weight);
static double cubic_interpolate(double p_from, double p_to, double p_pre, double p_post, double p_weight);
static double cubic_interpolate_angle(double p_from, double p_to, double p_pre, double p_post, double p_weight);
static double cubic_interpolate_in_time(double p_from, double p_to, double p_pre, double p_post, double p_weight, double p_to_t, double p_pre_t, double p_post_t);
static double cubic_interpolate_angle_in_time(double p_from, double p_to, double p_pre, double p_post, double p_weight, double p_to_t, double p_pre_t, double p_post_t);
static double bezier_interpolate(double p_start, double p_control_1, double p_control_2, double p_end, double p_t);
static double bezier_derivative(double p_start, double p_control_1, double p_control_2, double p_end, double p_t);
static double angle_difference(double p_from, double p_to);
static double lerp_angle(double p_from, double p_to, double p_weight);
static double inverse_lerp(double p_from, double p_to, double p_weight);
static double remap(double p_value, double p_istart, double p_istop, double p_ostart, double p_ostop);
static double smoothstep(double p_from, double p_to, double p_x);
static double move_toward(double p_from, double p_to, double p_delta);
static double rotate_toward(double p_from, double p_to, double p_delta);
static double deg_to_rad(double p_deg);
static double rad_to_deg(double p_rad);
static double linear_to_db(double p_lin);
static double db_to_linear(double p_db);
static Variant wrap(const Variant &p_value, const Variant &p_min, const Variant &p_max);
static int64_t wrapi(int64_t p_value, int64_t p_min, int64_t p_max);
static double wrapf(double p_value, double p_min, double p_max);
private:
static Variant max_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static Variant max(const Variant &p_arg1, const Variant &p_arg2, const Args &...p_args) {
std::array<Variant, 2 + sizeof...(Args)> variant_args{{ p_arg1, p_arg2, Variant(p_args)... }};
std::array<const Variant *, 2 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
return max_internal(call_args.data(), variant_args.size());
}
static int64_t maxi(int64_t p_a, int64_t p_b);
static double maxf(double p_a, double p_b);
private:
static Variant min_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static Variant min(const Variant &p_arg1, const Variant &p_arg2, const Args &...p_args) {
std::array<Variant, 2 + sizeof...(Args)> variant_args{{ p_arg1, p_arg2, Variant(p_args)... }};
std::array<const Variant *, 2 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
return min_internal(call_args.data(), variant_args.size());
}
static int64_t mini(int64_t p_a, int64_t p_b);
static double minf(double p_a, double p_b);
static Variant clamp(const Variant &p_value, const Variant &p_min, const Variant &p_max);
static int64_t clampi(int64_t p_value, int64_t p_min, int64_t p_max);
static double clampf(double p_value, double p_min, double p_max);
static int64_t nearest_po2(int64_t p_value);
static double pingpong(double p_value, double p_length);
static void randomize();
static int64_t randi();
static double randf();
static int64_t randi_range(int64_t p_from, int64_t p_to);
static double randf_range(double p_from, double p_to);
static double randfn(double p_mean, double p_deviation);
static void seed(int64_t p_base);
static PackedInt64Array rand_from_seed(int64_t p_seed);
static Variant weakref(const Variant &p_obj);
static int64_t type_of(const Variant &p_variable);
static Variant type_convert(const Variant &p_variant, int64_t p_type);
private:
static String str_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static String str(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
return str_internal(call_args.data(), variant_args.size());
}
static String error_string(int64_t p_error);
static String type_string(int64_t p_type);
private:
static void print_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void print(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
print_internal(call_args.data(), variant_args.size());
}
private:
static void print_rich_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void print_rich(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
print_rich_internal(call_args.data(), variant_args.size());
}
private:
static void printerr_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void printerr(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
printerr_internal(call_args.data(), variant_args.size());
}
private:
static void printt_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void printt(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
printt_internal(call_args.data(), variant_args.size());
}
private:
static void prints_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void prints(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
prints_internal(call_args.data(), variant_args.size());
}
private:
static void printraw_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void printraw(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
printraw_internal(call_args.data(), variant_args.size());
}
private:
static void print_verbose_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void print_verbose(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
print_verbose_internal(call_args.data(), variant_args.size());
}
private:
static void push_error_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void push_error(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
push_error_internal(call_args.data(), variant_args.size());
}
private:
static void push_warning_internal(const Variant **p_args, GDExtensionInt p_arg_count);
public:
template <typename... Args>
static void push_warning(const Variant &p_arg1, const Args &...p_args) {
std::array<Variant, 1 + sizeof...(Args)> variant_args{{ p_arg1, Variant(p_args)... }};
std::array<const Variant *, 1 + sizeof...(Args)> call_args;
for (size_t i = 0; i < variant_args.size(); i++) {
call_args[i] = &variant_args[i];
}
push_warning_internal(call_args.data(), variant_args.size());
}
static String var_to_str(const Variant &p_variable);
static Variant str_to_var(const String &p_string);
static PackedByteArray var_to_bytes(const Variant &p_variable);
static Variant bytes_to_var(const PackedByteArray &p_bytes);
static PackedByteArray var_to_bytes_with_objects(const Variant &p_variable);
static Variant bytes_to_var_with_objects(const PackedByteArray &p_bytes);
static int64_t hash(const Variant &p_variable);
static Object *instance_from_id(int64_t p_instance_id);
static bool is_instance_id_valid(int64_t p_id);
static int64_t rid_allocate_id();
static RID rid_from_int64(int64_t p_base);
static bool is_same(const Variant &p_a, const Variant &p_b);
};
} // namespace godot
@@ -0,0 +1,34 @@
/**************************************************************************/
/* variant_size.hpp */
/**************************************************************************/
/* 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.
#pragma once
#define GODOT_CPP_VARIANT_SIZE 24