Gwyfile Library
Data Structures | Enumerations | Functions
gwyfile.h File Reference

Gwyfile Library. More...

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>

Go to the source code of this file.

Data Structures

struct  GwyfileError
 Detailed information about an error. More...
 
struct  GwyfileErrorList
 List of errors. More...
 

Enumerations

enum  GwyfileItemType {
  GWYFILE_ITEM_BOOL = 'b' , GWYFILE_ITEM_CHAR = 'c' , GWYFILE_ITEM_INT32 = 'i' , GWYFILE_ITEM_INT64 = 'q' ,
  GWYFILE_ITEM_DOUBLE = 'd' , GWYFILE_ITEM_STRING = 's' , GWYFILE_ITEM_OBJECT = 'o' , GWYFILE_ITEM_CHAR_ARRAY = 'C' ,
  GWYFILE_ITEM_INT32_ARRAY = 'I' , GWYFILE_ITEM_INT64_ARRAY = 'Q' , GWYFILE_ITEM_DOUBLE_ARRAY = 'D' , GWYFILE_ITEM_STRING_ARRAY = 'S' ,
  GWYFILE_ITEM_OBJECT_ARRAY = 'O'
}
 
enum  GwyfileErrorDomain { GWYFILE_ERROR_DOMAIN_SYSTEM = 0 , GWYFILE_ERROR_DOMAIN_DATA = 1 , GWYFILE_ERROR_DOMAIN_VALIDITY = 2 , GWYFILE_ERROR_DOMAIN_WARNING = 3 }
 
enum  GwyfileErrorCode {
  GWYFILE_ERROR_MAGIC = 0 , GWYFILE_ERROR_ITEM_TYPE = 1 , GWYFILE_ERROR_CONFINEMENT = 2 , GWYFILE_ERROR_ARRAY_SIZE = 3 ,
  GWYFILE_ERROR_DUPLICATE_NAME = 4 , GWYFILE_ERROR_LONG_STRING = 5 , GWYFILE_ERROR_OBJECT_SIZE = 6 , GWYFILE_ERROR_OBJECT_NAME = 7 ,
  GWYFILE_ERROR_MISSING_ITEM = 8 , GWYFILE_ERROR_TOO_DEEP_NESTING = 9 , GWYFILE_ERROR_TRUNCATED = 10
}
 
enum  GwyfileCheckFlags { GWYFILE_CHECK_FLAG_VALIDITY = (1 << GWYFILE_ERROR_DOMAIN_VALIDITY) , GWYFILE_CHECK_FLAG_WARNING = (1 << GWYFILE_ERROR_DOMAIN_WARNING) , GWYFILE_CHECK_FLAG_GWYDDION = (1 << GWYFILE_ERROR_DOMAIN_DATA) }
 
enum  GwyfileInvalidCode { GWYFILE_INVALID_UTF8_NAME = 0 , GWYFILE_INVALID_UTF8_TYPE = 1 , GWYFILE_INVALID_UTF8_STRING = 2 , GWYFILE_INVALID_DOUBLE = 3 }
 
enum  GwyfileWarningCode { GWYFILE_WARNING_TYPE_IDENTIFIER = 0 , GWYFILE_WARNING_EMPTY_NAME = 1 }
 
enum  GwyfileCopyMethod { GWYFILE_COPY_IF_OWNED = 0 , GWYFILE_COPY_DEFAULT = GWYFILE_COPY_IF_OWNED , GWYFILE_COPY_ALL = 1 , GWYFILE_COPY_NONE = 2 }
 

Functions

void gwyfile_error_clear (GwyfileError **error)
 Clears a GwyfileError. More...
 
void gwyfile_error_list_init (GwyfileErrorList *errlist)
 Initializes a GwyfileErrorList. More...
 
void gwyfile_error_list_clear (GwyfileErrorList *errlist)
 Frees all errors in a GwyfileErrorList. More...
 
bool gwyfile_check_object (const GwyfileObject *object, unsigned int flags, GwyfileErrorList *errlist)
 Checks an object for specifications violations. More...
 
GwyfileObject * gwyfile_object_new_datafield (int xres, int yres, double xreal, double yreal,...)
 Creates a new GWY file GwyDataField object. More...
 
bool gwyfile_object_datafield_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwyDataField object. More...
 
GwyfileObject * gwyfile_object_new_dataline (int res, double real,...)
 Creates a new GWY file GwyDataLine object. More...
 
bool gwyfile_object_dataline_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwyDataLine object. More...
 
GwyfileObject * gwyfile_object_new_brick (int xres, int yres, int zres, double xreal, double yreal, double zreal,...)
 Creates a new GWY file GwyBrick object. More...
 
bool gwyfile_object_brick_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwyBrick object. More...
 
GwyfileObject * gwyfile_object_new_surface (int n,...)
 Creates a new GWY file GwySurface object. More...
 
bool gwyfile_object_surface_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySurface object. More...
 
GwyfileObject * gwyfile_object_new_lawn (int xres, int yres, int ncurves, double xreal, double yreal,...)
 Creates a new GWY file GwyLawn object. More...
 
bool gwyfile_object_lawn_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwyLawn object. More...
 
GwyfileObject * gwyfile_object_new_spectra (int ncurves, GwyfileObject **curves,...)
 Creates a new GWY file GwySpectra object. More...
 
bool gwyfile_object_spectra_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySpectra object. More...
 
GwyfileObject * gwyfile_object_new_graphmodel (int ncurves,...)
 Creates a new GWY file GwyGraphModel object. More...
 
bool gwyfile_object_graphmodel_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwyGraphModel object. More...
 
GwyfileObject * gwyfile_object_new_graphcurvemodel (int ndata,...)
 Creates a new GWY file GwyGraphCurveModel object. More...
 
bool gwyfile_object_graphcurvemodel_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwyGraphCurveModel object. More...
 
GwyfileObject * gwyfile_object_new_selectionpoint (int nsel,...)
 Creates a new GWY file GwySelectionPoint object. More...
 
bool gwyfile_object_selectionpoint_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionPoint object. More...
 
GwyfileObject * gwyfile_object_new_selectioncross (int nsel,...)
 Creates a new GWY file GwySelectionCross object. More...
 
bool gwyfile_object_selectioncross_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionCross object. More...
 
GwyfileObject * gwyfile_object_new_selectionline (int nsel,...)
 Creates a new GWY file GwySelectionLine object. More...
 
bool gwyfile_object_selectionline_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionLine object. More...
 
GwyfileObject * gwyfile_object_new_selectionrectangle (int nsel,...)
 Creates a new GWY file GwySelectionRectangle object. More...
 
bool gwyfile_object_selectionrectangle_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionRectangle object. More...
 
GwyfileObject * gwyfile_object_new_selectionellipse (int nsel,...)
 Creates a new GWY file GwySelectionEllipse object. More...
 
bool gwyfile_object_selectionellipse_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionEllipse object. More...
 
GwyfileObject * gwyfile_object_new_selectionlattice (int nsel,...)
 Creates a new GWY file GwySelectionLattice object. More...
 
bool gwyfile_object_selectionlattice_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionLattice object. More...
 
GwyfileObject * gwyfile_object_new_selectionprojective (int nsel,...)
 Creates a new GWY file GwySelectionProjective object. More...
 
bool gwyfile_object_selectionprojective_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionProjective object. More...
 
GwyfileObject * gwyfile_object_new_selectionaxis (int nsel, int orientation,...)
 Creates a new GWY file GwySelectionAxis object. More...
 
bool gwyfile_object_selectionaxis_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionAxis object. More...
 
GwyfileObject * gwyfile_object_new_selectionpath (int nsel, double slackness, bool closed,...)
 Creates a new GWY file GwySelectionPath object. More...
 
bool gwyfile_object_selectionpath_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySelectionPath object. More...
 
GwyfileObject * gwyfile_object_new_siunit (const char *unitstr)
 Creates a new GWY file GwySIUnit object. More...
 
bool gwyfile_object_siunit_get (const GwyfileObject *object, GwyfileError **error,...)
 Obtains information and/or data from a GWY file GwySIUnit object. More...
 
int * gwyfile_object_container_enumerate_channels (const GwyfileObject *object, unsigned int *nchannels)
 Enumerates channels in a Gwyddion GWY file. More...
 
int * gwyfile_object_container_enumerate_volume (const GwyfileObject *object, unsigned int *nvolume)
 Enumerates volume data in a Gwyddion GWY file. More...
 
int * gwyfile_object_container_enumerate_graphs (const GwyfileObject *object, unsigned int *ngraphs)
 Enumerates graphs in a Gwyddion GWY file. More...
 
int * gwyfile_object_container_enumerate_xyz (const GwyfileObject *object, unsigned int *nxyz)
 Enumerates XYZ data in a Gwyddion GWY file. More...
 
int * gwyfile_object_container_enumerate_curvemaps (const GwyfileObject *object, unsigned int *nxyz)
 Enumerates curve map data in a Gwyddion GWY file. More...
 
int * gwyfile_object_container_enumerate_spectra (const GwyfileObject *object, unsigned int *nspectra)
 Enumerates spectra in a Gwyddion GWY file. More...
 
void gwyfile_item_free (GwyfileItem *item)
 Frees a GWY file data item. More...
 
GwyfileItemType gwyfile_item_type (const GwyfileItem *item)
 Obtains the type of a GWY file data item. More...
 
const char * gwyfile_item_name (const GwyfileItem *item)
 Obtains the name of a GWY file data item. More...
 
uint32_t gwyfile_item_array_length (const GwyfileItem *item)
 Obtains the array length of a GWY file data item. More...
 
size_t gwyfile_item_size (const GwyfileItem *item)
 Obtains the serialized total size of a GWY file data item. More...
 
size_t gwyfile_item_data_size (const GwyfileItem *item)
 Obtains the serialized size of a GWY file data item data. More...
 
GwyfileItem * gwyfile_item_copy (const GwyfileItem *item, GwyfileCopyMethod method)
 Creates a copy of a data item. More...
 
bool gwyfile_item_fwrite (const GwyfileItem *item, FILE *stream, GwyfileError **error)
 Writes a GWY file data item to a stdio stream. More...
 
GwyfileItem * gwyfile_item_fread (FILE *stream, size_t max_size, GwyfileError **error)
 Reads a GWY file data item from a stdio stream. More...
 
size_t gwyfile_item_write_memory (const GwyfileItem *item, void *buffer, size_t size, GwyfileError **error)
 Writes a GWY file data item to a memory buffer. More...
 
GwyfileItem * gwyfile_item_read_memory (const void *buffer, size_t size, size_t *bytes_read, GwyfileError **error)
 Reads a GWY file data item from a memory buffer. More...
 
bool gwyfile_item_owns_data (const GwyfileItem *item)
 Reports if a GWY file item owns its data. More...
 
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...
 
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...
 
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...
 
GwyfileItem * gwyfile_item_new_int64 (const char *name, int64_t value)
 Creates a new 64bit integer GWY file item. More...
 
int64_t gwyfile_item_get_int64 (const GwyfileItem *item)
 Gets the 64bit integer value contained in a GWY file data item. More...
 
void gwyfile_item_set_int64 (GwyfileItem *item, int64_t value)
 Sets the value of a 64bit integer GWY file item. More...
 
GwyfileItem * gwyfile_item_new_double (const char *name, double value)
 Creates a new double GWY file item. More...
 
double gwyfile_item_get_double (const GwyfileItem *item)
 Gets the double value contained in a GWY file data item. More...
 
void gwyfile_item_set_double (GwyfileItem *item, double value)
 Sets the value of a double GWY file item. More...
 
GwyfileItem * gwyfile_item_new_string (const char *name, char *value)
 Creates a new string GWY file item. More...
 
GwyfileItem * gwyfile_item_new_string_copy (const char *name, const char *value)
 Creates a new string GWY file item. More...
 
GwyfileItem * gwyfile_item_new_string_const (const char *name, const char *value)
 Creates a new string GWY file item. More...
 
const char * gwyfile_item_get_string (const GwyfileItem *item)
 Gets the string value contained in a GWY file data item. More...
 
char * gwyfile_item_take_string (GwyfileItem *item)
 Takes the string value contained in a GWY file data item. More...
 
void gwyfile_item_set_string (GwyfileItem *item, char *value)
 Sets the value of a string GWY file item. More...
 
void gwyfile_item_set_string_copy (GwyfileItem *item, const char *value)
 Sets the value of a string GWY file item. More...
 
void gwyfile_item_set_string_const (GwyfileItem *item, const char *value)
 Sets the value of a string GWY file item. More...
 
GwyfileItem * gwyfile_item_new_object (const char *name, GwyfileObject *value)
 Creates a new object GWY file item. More...
 
GwyfileObject * gwyfile_item_get_object (const GwyfileItem *item)
 Gets the object value contained in a GWY file data item. More...
 
GwyfileObject * gwyfile_item_release_object (GwyfileItem *item)
 Releases the object contained in a GWY file data item and frees the item. More...
 
void gwyfile_item_set_object (GwyfileItem *item, GwyfileObject *value)
 Sets the value of an object GWY file item. More...
 
GwyfileItem * gwyfile_item_new_char_array (const char *name, char *value, uint32_t array_length)
 Creates a new character array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_char_array_copy (const char *name, const char *value, uint32_t array_length)
 Creates a new character array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_char_array_const (const char *name, const char *value, uint32_t array_length)
 Creates a new character array GWY file item. More...
 
const char * gwyfile_item_get_char_array (const GwyfileItem *item)
 Gets the character array value contained in a GWY file data item. More...
 
char * gwyfile_item_take_char_array (GwyfileItem *item)
 Takes the character array value contained in a GWY file data item. More...
 
void gwyfile_item_set_char_array (GwyfileItem *item, char *value, uint32_t array_length)
 Sets the value of a character array GWY file item. More...
 
void gwyfile_item_set_char_array_copy (GwyfileItem *item, const char *value, uint32_t array_length)
 Sets the value of a character array GWY file item. More...
 
void gwyfile_item_set_char_array_const (GwyfileItem *item, const char *value, uint32_t array_length)
 Sets the value of a character array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_int32_array (const char *name, int32_t *value, uint32_t array_length)
 Creates a new 32bit integer array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_int32_array_copy (const char *name, const int32_t *value, uint32_t array_length)
 Creates a new 32bit integer array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_int32_array_const (const char *name, const int32_t *value, uint32_t array_length)
 Creates a new 32bit integer array GWY file item. More...
 
const int32_t * gwyfile_item_get_int32_array (const GwyfileItem *item)
 Gets the 32bit integer array value contained in a GWY file data item. More...
 
int32_t * gwyfile_item_take_int32_array (GwyfileItem *item)
 Takes the 32bit integer array value contained in a GWY file data item. More...
 
void gwyfile_item_set_int32_array (GwyfileItem *item, int32_t *value, uint32_t array_length)
 Sets the value of a 32bit integer array GWY file item. More...
 
void gwyfile_item_set_int32_array_copy (GwyfileItem *item, const int32_t *value, uint32_t array_length)
 Sets the value of a 32bit integer array GWY file item. More...
 
void gwyfile_item_set_int32_array_const (GwyfileItem *item, const int32_t *value, uint32_t array_length)
 Sets the value of a 32bit integer array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_int64_array (const char *name, int64_t *value, uint32_t array_length)
 Creates a new 64bit integer array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_int64_array_copy (const char *name, const int64_t *value, uint32_t array_length)
 Creates a new 64bit integer array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_int64_array_const (const char *name, const int64_t *value, uint32_t array_length)
 Creates a new 64bit integer array GWY file item. More...
 
const int64_t * gwyfile_item_get_int64_array (const GwyfileItem *item)
 Gets the 64bit integer array value contained in a GWY file data item. More...
 
int64_t * gwyfile_item_take_int64_array (GwyfileItem *item)
 Takes the 64bit integer array value contained in a GWY file data item. More...
 
void gwyfile_item_set_int64_array (GwyfileItem *item, int64_t *value, uint32_t array_length)
 Sets the value of a 64bit integer array GWY file item. More...
 
void gwyfile_item_set_int64_array_copy (GwyfileItem *item, const int64_t *value, uint32_t array_length)
 Sets the value of a 64bit integer array GWY file item. More...
 
void gwyfile_item_set_int64_array_const (GwyfileItem *item, const int64_t *value, uint32_t array_length)
 Sets the value of a 64bit integer array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_double_array (const char *name, double *value, uint32_t array_length)
 Creates a new double array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_double_array_copy (const char *name, const double *value, uint32_t array_length)
 Creates a new double array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_double_array_const (const char *name, const double *value, uint32_t array_length)
 Creates a new double array GWY file item. More...
 
const double * gwyfile_item_get_double_array (const GwyfileItem *item)
 Gets the double array value contained in a GWY file data item. More...
 
double * gwyfile_item_take_double_array (GwyfileItem *item)
 Takes the double array value contained in a GWY file data item. More...
 
void gwyfile_item_set_double_array (GwyfileItem *item, double *value, uint32_t array_length)
 Sets the value of a double array GWY file item. More...
 
void gwyfile_item_set_double_array_copy (GwyfileItem *item, const double *value, uint32_t array_length)
 Sets the value of a 64bit integer array GWY file item. More...
 
void gwyfile_item_set_double_array_const (GwyfileItem *item, const double *value, uint32_t array_length)
 Sets the value of a double array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_string_array (const char *name, char **value, uint32_t array_length)
 Creates a new string array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_string_array_copy (const char *name, const char *const *value, uint32_t array_length)
 Creates a new string array GWY file item. More...
 
GwyfileItem * gwyfile_item_new_string_array_const (const char *name, const char *const *value, uint32_t array_length)
 Creates a new string array GWY file item. More...
 
const char *const * gwyfile_item_get_string_array (const GwyfileItem *item)
 Gets the string array value contained in a GWY file data item. More...
 
char ** gwyfile_item_take_string_array (GwyfileItem *item)
 Takes the string array value contained in a GWY file data item. More...
 
void gwyfile_item_set_string_array (GwyfileItem *item, char **value, uint32_t array_length)
 Sets the value of a string array GWY file item. More...
 
void gwyfile_item_set_string_array_copy (GwyfileItem *item, const char *const *value, uint32_t array_length)
 Sets the value of a string array GWY file item. More...
 
void gwyfile_item_set_string_array_const (GwyfileItem *item, const char *const *value, uint32_t array_length)
 Sets the value of a string array GWY file item. More...
 
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...
 
bool gwyfile_write_file (GwyfileObject *object, const char *filename, GwyfileError **error)
 Writes a GWY file to a named file. More...
 
GwyfileObject * gwyfile_read_file (const char *filename, GwyfileError **error)
 Reads a GWY file from a named file and returns its top-level object. More...
 
bool gwyfile_fwrite (GwyfileObject *object, FILE *stream, GwyfileError **error)
 Writes a GWY file to a stdio stream. More...
 
GwyfileObject * gwyfile_fread (FILE *stream, size_t max_size, GwyfileError **error)
 Reads a GWY file from a stdio stream and returns the top-level object. More...
 
bool gwyfile_write_wfile (GwyfileObject *object, const wchar_t *filename, GwyfileError **error)
 Writes a GWY file to a named file (wide-character variant). More...
 
GwyfileObject * gwyfile_read_wfile (const wchar_t *filename, GwyfileError **error)
 Reads a GWY file from a named file and returns its top-level object (wide-character variant). More...
 
bool gwyfile_object_fwrite (GwyfileObject *object, FILE *stream, GwyfileError **error)
 Writes a GWY file data object to a stdio stream. More...
 
GwyfileObject * gwyfile_object_fread (FILE *stream, size_t max_size, GwyfileError **error)
 Reads a GWY file data object from a stdio stream. More...
 
size_t gwyfile_object_write_memory (const GwyfileObject *object, void *buffer, size_t size, GwyfileError **error)
 Writes a GWY file data object to a memory buffer. More...
 
GwyfileObject * gwyfile_object_read_memory (const void *buffer, size_t size, size_t *bytes_read, GwyfileError **error)
 Reads a GWY file data object from a memory buffer. More...
 
typedef void(* GwyfileObjectForeachFunc) (const GwyfileItem *item, void *user_data)
 Type of function for iterating over GWY file data object items. More...
 
GwyfileObject * gwyfile_object_new (const char *name,...)
 Creates a new GWY file object. More...
 
GwyfileObject * gwyfile_object_newv (const char *name, GwyfileItem **items, unsigned int nitems)
 Creates a new GWY file object. More...
 
void gwyfile_object_free (GwyfileObject *object)
 Frees a GWY file data object. More...
 
const char * gwyfile_object_name (const GwyfileObject *object)
 Obtains the name of a GWY file data object. More...
 
size_t gwyfile_object_size (const GwyfileObject *object)
 Obtains the serialized size of a GWY file data object. More...
 
bool gwyfile_object_add (GwyfileObject *object, GwyfileItem *item)
 Adds an data item to a GWY file data object. More...
 
bool gwyfile_object_remove (GwyfileObject *object, const char *name)
 Removes an item from a GWY file data object and frees it. More...
 
GwyfileItem * gwyfile_object_get (const GwyfileObject *object, const char *name)
 Finds a data item in a GWY file object. More...
 
GwyfileItem * gwyfile_object_take (GwyfileObject *object, const char *name)
 Takes an item from a GWY file data object. More...
 
GwyfileItem * gwyfile_object_get_with_type (const GwyfileObject *object, const char *name, GwyfileItemType type)
 Finds a data item in a GWY file object, ensuring its type. More...
 
GwyfileItem * gwyfile_object_take_with_type (GwyfileObject *object, const char *name, GwyfileItemType type)
 Takes a data item from a GWY file object, ensuring its type. More...
 
size_t gwyfile_object_data_size (const GwyfileObject *object)
 Obtains the serialized data size of a GWY file data object. More...
 
GwyfileItem * gwyfile_object_get_nth (const GwyfileObject *object, unsigned int n)
 Gets n-th data item from a GWY file object. More...
 
void gwyfile_object_foreach (const GwyfileObject *object, GwyfileObjectForeachFunc function, void *user_data)
 Calls a function for each item contained in a GWY file data object. More...
 
unsigned int gwyfile_object_nitems (const GwyfileObject *object)
 Obtains the number of items in a GWY file data object. More...
 
const char ** gwyfile_object_item_names (const GwyfileObject *object)
 Constructs the list of names of all items in a GWY file data object. More...
 
GwyfileObject * gwyfile_object_copy (const GwyfileObject *object, GwyfileCopyMethod method)
 Creates a copy of a GWY file object. More...
 

Detailed Description

Gwyfile Library.