Gwyfile Library
|
Functions | |
GwyfileItem * | gwyfile_item_new_object_array (const char *name, GwyfileObject **value, uint32_t array_length) |
Creates a new object array GWY file item. More... | |
GwyfileObject *const * | gwyfile_item_get_object_array (const GwyfileItem *item) |
Gets the object array value contained in a GWY file data item. More... | |
void | gwyfile_item_set_object_array (GwyfileItem *item, GwyfileObject **value, uint32_t array_length) |
Sets the value of a object array GWY file item. More... | |
GwyfileObject* const* gwyfile_item_get_object_array | ( | const GwyfileItem * | item | ) |
Gets the object array value contained in a GWY file data item.
Use gwyfile_item_array_length() to obtain the array length.
The item must be of the object array type. Use gwyfile_item_type() to check item type if the type may not match the expected type. Use gwyfile_object_get_with_type() to obtain object items ensuring the type.
item | An object GWY file data item. |
item
. The array and objects ownership does not change. GwyfileItem* gwyfile_item_new_object_array | ( | const char * | name, |
GwyfileObject ** | value, | ||
uint32_t | array_length | ||
) |
Creates a new object array GWY file item.
The item consumes the provided array and all objects inside and takes care of freeing them later. You must not touch the array any more; it can be already freed when this function returns.
name | Item name. It must be a non-empty UTF-8-encoded string (usually, it should be an ASCII string). A copy of the string will be made. |
value | Item value (to be consumed). |
array_length | Array length. It must be non-zero as GWY files do not permit empty arrays. |
void gwyfile_item_set_object_array | ( | GwyfileItem * | item, |
GwyfileObject ** | value, | ||
uint32_t | array_length | ||
) |
Sets the value of a object array GWY file item.
The item must be of the object array type.
The item consumes the provided array and the objects inside and takes care of freeing them later. You must not touch the array any more; it can be already freed when this function returns.
item | A object array GWY file data item. |
value | New value for the item (to be consumed). |
array_length | Array length. It must be non-zero as GWY files do not permit empty arrays. |