Gwyfile Library
Functions
Item – 32bit integer

Functions

GwyfileItem * gwyfile_item_new_int32 (const char *name, int32_t value)
 Creates a new 32bit integer GWY file item. More...
 
int32_t gwyfile_item_get_int32 (const GwyfileItem *item)
 Gets the 32bit integer value contained in a GWY file data item. More...
 
void gwyfile_item_set_int32 (GwyfileItem *item, int32_t value)
 Sets the value of a 32bit integer GWY file item. More...
 

Detailed Description

Function Documentation

◆ gwyfile_item_get_int32()

int32_t gwyfile_item_get_int32 ( const GwyfileItem *  item)

Gets the 32bit integer value contained in a GWY file data item.

The item must be of the 32bit integer 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.

Parameters
itemA 32bit integer GWY file data item.
Returns
The 32bit integer value of item.

◆ gwyfile_item_new_int32()

GwyfileItem* gwyfile_item_new_int32 ( const char *  name,
int32_t  value 
)

Creates a new 32bit integer GWY file item.

Parameters
nameItem 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.
valueItem value.
Returns
The newly created GWY file data item.

◆ gwyfile_item_set_int32()

void gwyfile_item_set_int32 ( GwyfileItem *  item,
int32_t  value 
)

Sets the value of a 32bit integer GWY file item.

The item must be of the 32bit integer type.

Parameters
itemA 32bit integer GWY file data item.
valueNew value for the item.