Gwyfile Library
Functions
Item – boolean

Functions

GwyfileItem * gwyfile_item_new_bool (const char *name, bool value)
 Creates a new boolean GWY file item. More...
 
bool gwyfile_item_get_bool (const GwyfileItem *item)
 Gets the boolean value contained in a GWY file data item. More...
 
void gwyfile_item_set_bool (GwyfileItem *item, bool value)
 Sets the value of a boolean GWY file item. More...
 

Detailed Description

Function Documentation

◆ gwyfile_item_get_bool()

bool gwyfile_item_get_bool ( const GwyfileItem *  item)

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

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

◆ gwyfile_item_new_bool()

GwyfileItem* gwyfile_item_new_bool ( const char *  name,
bool  value 
)

Creates a new boolean 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_bool()

void gwyfile_item_set_bool ( GwyfileItem *  item,
bool  value 
)

Sets the value of a boolean GWY file item.

The item must be of the boolean type.

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