Move Data Member Function

Moves the memory from the source array to the destination array. Leaves the source array empty with a count of zero.

Prototype

int32 Move( ColorArray p_acDestinationArray )

Parameters

Parameter Type Parameter Name Documentation
<ColorArray>p_acDestinationArrayA pointer to the destination <ColorArray>.

Examples

Copy Text To Clipboard

import library "app_service_console_util.ssl";
import library "type_color_array_util.ssl";

auto Color r = new Color( 1, 1, 1, 255 );
auto Color g = new Color( 2, 2, 2, 255 );
auto Color b = new Color( 3, 3, 3, 255 );

auto ColorArray src;
src.Add( r );
src.Add( g );
src.Add( b );

auto ColorArray dst;
src.Move( dst );

LibColorArray.Out( src );
LibColorArray.Out( dst );

Results

COLORARRAY OUTPUT generated by TYPE_COLOR_ARRAY_UTIL.SSL
// Src is now empty and dst owns its memory.
COLORARRAY OUTPUT generated by TYPE_COLOR_ARRAY_UTIL.SSL
1,
1,
1,
255,
2,
2,
2,
255,
3,
3,
3,
255