Module gwy :: Class AppDataId
[hide private]
[frames] | no frames]

Class AppDataId

source code

Auxiliary structure representing one data item in an open file.

The data container number can be obtained with gwy_app_data_browser_get() and used to look up the container with gwy_app_data_browser_get_number().


Since: 2.41

Instance Methods [hide private]
 
__init__(datano, id)
Creates a new data identifier on heap.
source code
 
copy()
Creates a copy of data identifier.
source code
 
free()
Frees a data identifier.
source code
 
verify_channel()
Checks if numerical channel identifiers correspond to an existing channel.
source code
 
verify_graph()
Checks if numerical graph identifiers correspond to an existing graph.
source code
 
verify_volume()
Checks if numerical volume data identifiers correspond to existing volume data.
source code
 
verify_xyz()
Checks if numerical XYZ data identifiers correspond to existing XYZ data.
source code
 
verify_curve_map()
Checks if numerical curve map data identifiers correspond to existing curve map data.
source code
 
verify_spectra()
Checks if numerical spectra identifiers correspond to existing spectra.
source code
Method Details [hide private]

__init__(datano, id)
(Constructor)

source code 

Creates a new data identifier on heap.

This is mostly useful for language bindings.

Parameters:
  • datano - Numeric identifier of data container. Zero is used for none. (int)
  • id - Numeric identifier of a specific data item, such as channel or graph number. Value -1 is used for none. (int)
Returns:
Newly allocated data id. It must be freed with AppDataId.free(). (AppDataId)

Since: 2.47

copy()

source code 

Creates a copy of data identifier.

This is mostly useful for language bindings.

Returns:
Newly allocated data id. It must be freed with AppDataId.free(). (AppDataId)

Since: 2.47

free()

source code 

Frees a data identifier.

This is mostly useful for language bindings.

Since: 2.47

verify_channel()

source code 

Checks if numerical channel identifiers correspond to an existing channel.

If either the data contained referenced in id or the channel does not exist the structure is cleared to APP_DATA_ID_NONE and the function returns False. If it represents an existing channel it is kept intact and the function returns True.

Returns:
Whether id refers to an existing channel now. (bool)

Since: 2.41

verify_graph()

source code 

Checks if numerical graph identifiers correspond to an existing graph.

If either the data contained referenced in id or the graph model does not exist the structure is cleared to APP_DATA_ID_NONE and the function returns False. If it represents an existing graph it is kept intact and the function returns True.

Returns:
Whether id refers to an existing graph now. (bool)

Since: 2.41

verify_volume()

source code 

Checks if numerical volume data identifiers correspond to existing volume data.

If either the data contained referenced in id or the volume data does not exist the structure is cleared to APP_DATA_ID_NONE and the function returns False. If it represents existing volume data it is kept intact and the function returns True.

Returns:
Whether id refers to existing volume data now. (bool)

Since: 2.41

verify_xyz()

source code 

Checks if numerical XYZ data identifiers correspond to existing XYZ data.

If either the data contained referenced in id or the XYZ data does not exist the structure is cleared to APP_DATA_ID_NONE and the function returns False. If it represents existing XYZ data it is kept intact and the function returns True.

Returns:
Whether id refers to existing XYZ data now. (bool)

Since: 2.46

verify_curve_map()

source code 

Checks if numerical curve map data identifiers correspond to existing curve map data.

If either the data contained referenced in id or the curve map data does not exist the structure is cleared to APP_DATA_ID_NONE and the function returns False. If it represents existing curve map data it is kept intact and the function returns True.

Returns:
Whether id refers to existing curve map data now. (bool)

Since: 2.46

verify_spectra()

source code 

Checks if numerical spectra identifiers correspond to existing spectra.

If either the data contained referenced in id or the spectra does not exist the structure is cleared to APP_DATA_ID_NONE and the function returns False. If it represents existing spectra it is kept intact and the function return True.

Returns:
Whether id refers to existing spectra now. (bool)

Since: 2.41