2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "PackedDataContainerRef" inherits= "RefCounted" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 20:42:36 +00:00
<brief_description >
2023-04-27 23:35:33 +00:00
An internal class used by [PackedDataContainer] to pack nested arrays and dictionaries.
2017-09-12 20:42:36 +00:00
</brief_description>
<description >
2023-04-28 22:05:16 +00:00
When packing nested containers using [PackedDataContainer], they are recursively packed into [PackedDataContainerRef] (only applies to [Array] and [Dictionary]). Their data can be retrieved the same way as from [PackedDataContainer].
[codeblock]
var packed = PackedDataContainer.new()
packed.pack([1, 2, 3, ["abc", "def"], 4, 5, 6])
for element in packed:
if element is PackedDataContainerRef:
for subelement in element:
print("::", subelement)
else:
print(element)
# Prints:
# 1
# 2
# 3
# ::abc
# ::def
# 4
# 5
# 6
[/codeblock]
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "size" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2023-04-28 22:05:16 +00:00
Returns the size of the packed container (see [method Array.size] and [method Dictionary.size]).
2017-09-12 20:42:36 +00:00
</description>
</method>
</methods>
</class>