A wrapper for GML data structures for type checking. Valid types: ds_type_list
, ds_type_grid
, ds_type_map
, ds_type_queue
, ds_type_stack
, ds_type_priority
, ds_type_ array
, ds_type_2darray
, ds_type_tuple
. Please note that the last three types are data structures, but they're not ds_* functions, just standard arrays included for type checking.
DS_OBJECT_CREATE will create any of the specified GML data structures given an optional parameter for [width/length] or [height] as required by each data structure.
ds_object_create(type, width[optional], height[optional]);
DS_OBJECT_CLONE will create a copy of the ds_object and it's data that you pass to it and return the new copy.
ds_object_clone(ds_object);
DS_OBJECT_COPY will copy the contents of the source
ds_object to the destination
ds_object.
ds_object_copy(source, destination);
DS_OBJECT_DESTROY will delete the ds_object you pass to it from dynamic memory.
ds_object_destroy(ds_object);
DS_OBJECT_IS_VALID will check if a ds_object and it's associated data structure exist.
ds_object_is_valid(ds_object);
DS_OBJECT_SOURCE will return the source ID for the data structure in the ds_object (or undefined, if not valid).
ds_object_source(ds_object);
DS_OBJECT_TYPE will return the type of the data structure in the ds object.
ds_object_type(ds_object);
DS_OBJECT_TYPE_STR will return the type name as a string of the data structure in the ds object (or undefined, if not valid).
ds_object_type_str(ds_type_*);
DS_TUPLE_READ will return either the first or second value of the tuple.
ds_tuple_read(ds_object, index[0, 1]);
DS_TUPLE_WRITE will write a value
to the tuple at an index[0 or 1]
.
ds_tuple_read(ds_object, index[0 or 1], value);