Gwyfile Library
Functions
Item – character

Functions

GwyfileItem * gwyfile_item_new_char (const char *name, char value)
 Creates a new character GWY file item. More...
 
char gwyfile_item_get_char (const GwyfileItem *item)
 Gets the character value contained in a GWY file data item. More...
 
void gwyfile_item_set_char (GwyfileItem *item, char value)
 Sets the value of a character GWY file item. More...
 

Detailed Description

Function Documentation

◆ gwyfile_item_get_char()

char gwyfile_item_get_char ( const GwyfileItem *  item)

Gets the character value contained in a GWY file data item.

The item must be of the character 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 character GWY file data item.
Returns
The character value of item.

◆ gwyfile_item_new_char()

GwyfileItem* gwyfile_item_new_char ( const char *  name,
char  value 
)

Creates a new character 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_char()

void gwyfile_item_set_char ( GwyfileItem *  item,
char  value 
)

Sets the value of a character GWY file item.

The item must be of the character type.

Parameters
itemA character GWY file data item.
valueNew value for the item.