PackedArray

Copy-on-write array for some Godot types, allocated with a memory pool.

Constructors

this
this(GDExtensionTypePtr opaque)
Undocumented in source.
this
this(Array arr)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Alias This

_packed_array

Members

Aliases

Read
alias Read = Access!false
VARIANT_TYPE
alias VARIANT_TYPE = PackedArrayVariantType[staticIndexOf!(T, PackedArrayTypes)]
Undocumented in source.
Write
alias Write = Access!true
append
alias append = pushBack
append_array
deprecated alias append_array = pushBack
Undocumented in source.
length
alias length = size
Undocumented in source.
opDollar
alias opDollar = size
Undocumented in source.

Functions

data
char* data()
Undocumented in source. Be warned that the author may not have intended to support it.
data
T* data()
Undocumented in source. Be warned that the author may not have intended to support it.
empty
bool empty()
insert
void insert(size_t idx, T data)
Undocumented in source. Be warned that the author may not have intended to support it.
invert
void invert()
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
PackedArray opAssign(PackedArray other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
PackedArray opBinary(PackedArray other)
opIndex
T opIndex(size_t idx)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(T data, size_t idx)
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
Range opSlice(size_t start, size_t end)
opSlice
Range opSlice()
pushBack
void pushBack(PackedArray arr)
pushBack
void pushBack(T data)
Undocumented in source. Be warned that the author may not have intended to support it.
read
Read read()

Lock the array for read-only access to the underlying memory. This is faster than using opIndex, which locks each time it's called.

remove
void remove(size_t idx)
Undocumented in source. Be warned that the author may not have intended to support it.
resize
void resize(size_t size)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(size_t idx, T data)
Undocumented in source. Be warned that the author may not have intended to support it.
size
size_t size()
Undocumented in source. Be warned that the author may not have intended to support it.
write
Write write()

Lock the array for write access to the underlying memory. This is faster than using opIndexAssign, which locks each time it's called.

Structs

Access
struct Access(bool write = false)

Read/Write access locks with RAII.

Range
struct Range

Slice-like view of the PackedArray.

Templates

opOpAssign
template opOpAssign(string op)

Unions

_PackedArray
union _PackedArray
Undocumented in source.

Variables

_packed_array
_PackedArray _packed_array;
Undocumented in source.

Meta