summaryrefslogtreecommitdiff
path: root/core/array.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2020-04-20 19:06:00 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-04-21 10:15:40 +0200
commit5d4dc2d45caef77cdb52e365bc02f64d54046df5 (patch)
treefb09d0a007a7a4fb4c45826e0e5955da4a11a07c /core/array.h
parent7343ec13d9d32cedb2511db0ab5d1ed454404d65 (diff)
Add ability to bind typed arrays to script API
Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
Diffstat (limited to 'core/array.h')
-rw-r--r--core/array.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/array.h b/core/array.h
index 3b14bdb9fe..2840ce199c 100644
--- a/core/array.h
+++ b/core/array.h
@@ -47,6 +47,10 @@ class Array {
int _clamp_index(int p_index) const;
static int _fix_slice_index(int p_index, int p_arr_len, int p_top_mod);
+protected:
+ Array(const Array &p_base, uint32_t p_type, const StringName &p_class_name, const Variant &p_script);
+ void _assign(const Array &p_array);
+
public:
Variant &operator[](int p_idx);
const Variant &operator[](int p_idx) const;
@@ -101,6 +105,7 @@ public:
const void *id() const;
+ void set_typed(uint32_t p_type, const StringName &p_class_name, const Variant &p_script);
Array(const Array &p_from);
Array();
~Array();