Correct the Pool*Array documentation

This commit is contained in:
Hein-Pieter van Braam 2017-09-09 16:11:29 +02:00
parent d1cb73b47a
commit daa66cd5c2
2 changed files with 22 additions and 20 deletions

View file

@ -1623,7 +1623,7 @@ void register_variant_methods() {
ADDFUNC2(POOL_STRING_ARRAY, INT, PoolStringArray, insert, INT, "idx", STRING, "string", varray());
ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, resize, INT, "idx", varray());
ADDFUNC0(POOL_STRING_ARRAY, NIL, PoolStringArray, invert, varray());
ADDFUNC1(POOL_STRING_ARRAY, STRING, PoolStringArray, join, STRING, "string", varray());
ADDFUNC1(POOL_STRING_ARRAY, STRING, PoolStringArray, join, STRING, "delimiter", varray());
ADDFUNC0(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, size, varray());
ADDFUNC2(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, set, INT, "idx", VECTOR2, "vector2", varray());

View file

@ -38438,13 +38438,14 @@
<argument index="0" name="byte" type="int">
</argument>
<description>
Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="PoolByteArray">
</argument>
<description>
Append an [PoolByteArray] at the end of this array.
Append a [PoolByteArray] at the end of this array.
</description>
</method>
<method name="compress">
@ -38453,7 +38454,7 @@
<argument index="0" name="compression_mode" type="int" default="0">
</argument>
<description>
Returns a new [PoolByteArray] with the data compressed. The compression mode can be set using one of the COMPRESS_* constants of [File].
Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants.
</description>
</method>
<method name="decompress">
@ -38464,21 +38465,21 @@
<argument index="1" name="compression_mode" type="int" default="0">
</argument>
<description>
Returns a new [PoolByteArray] with the data decompressed. The buffer_size should be set as the size of the uncompressed data. The compression mode can be set using one of the COMPRESS_* constants of [File].
Returns a new [PoolByteArray] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants.
</description>
</method>
<method name="get_string_from_ascii">
<return type="String">
</return>
<description>
Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart).
Returns a copy of the array's contents as [String]. Fast alternative to [method PoolByteArray.get_string_from_utf8] if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method PoolByteArray.get_string_from_utf8].
</description>
</method>
<method name="get_string_from_utf8">
<return type="String">
</return>
<description>
Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input.
Returns a copy of the array's contents as [String]. Slower than [method PoolByteArray.get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred.
</description>
</method>
<method name="insert">
@ -38515,7 +38516,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Set the size of the [PoolByteArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@ -38554,7 +38555,7 @@
Array of Colors
</brief_description>
<description>
Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="PoolColorArray">
@ -38577,7 +38578,7 @@
<argument index="0" name="array" type="PoolColorArray">
</argument>
<description>
Append an [PoolColorArray] at the end of this array.
Append a [PoolColorArray] at the end of this array.
</description>
</method>
<method name="insert">
@ -38614,7 +38615,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Set the size of the [PoolColorArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@ -38630,7 +38631,7 @@
<return type="int">
</return>
<description>
Return the array size.
Return the size of the array.
</description>
</method>
</methods>
@ -38642,7 +38643,7 @@
Integer Array.
</brief_description>
<description>
Integer Array. Array of integers. Can only contain integers. Optimized for memory usage, can't fragment the memory.
Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="PoolIntArray">
@ -38702,7 +38703,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Set the size of the [PoolIntArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@ -38790,7 +38791,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Set the size of the [RealArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@ -38857,15 +38858,16 @@
</method>
<method name="invert">
<description>
Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="join">
<return type="String">
</return>
<argument index="0" name="string" type="String">
<argument index="0" name="delimiter" type="String">
</argument>
<description>
Reverse the order of the elements in the array (so first element will now be the last).
Returns a [String] with each element of the array joined with the delimiter.
</description>
</method>
<method name="push_back">
@ -38886,7 +38888,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Set the size of the [StringArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@ -38974,7 +38976,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Set the size of the PoolVector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@ -39048,7 +39050,7 @@
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
Insert a Vector3 at the end.
Insert a [Vector3] at the end.
</description>
</method>
<method name="remove">
@ -39062,7 +39064,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Set the size of the PoolVector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">