2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								<?xml version="1.0" encoding="UTF-8" ?>  
						 
					
						
							
								
									
										
										
										
											2023-07-06 10:08:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								<class  name= "PackedDataContainerRef"  inherits= "RefCounted"  xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation= "../class.xsd" >  
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									<brief_description > 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-28 01:35:33 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										An internal class used by [PackedDataContainer] to pack nested arrays and dictionaries.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									</brief_description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									<description > 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-29 00:05:16 +02: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 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									<tutorials > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									</tutorials> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									<methods > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<method  name= "size"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											<return  type= "int"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-29 00:05:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												Returns the size of the packed container (see [method Array.size] and [method Dictionary.size]).
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									</methods> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</class>