## GOData

GOData

## Synopsis

                        GOData;
                        GODataClass;

    GOData*             go_data_dup                         (GOData const *src);
    gboolean            go_data_eq                          (GOData const *a,
                                                             GOData const *b);
    GOFormat*           go_data_preferred_fmt               (GOData const *dat);
    GODateConventionsconst * go_data_date_conv              (GOData const *dat);
    char*               go_data_serialize                   (GOData const *dat,
                                                             gpointer user);
    gboolean            go_data_unserialize                 (GOData *dat,
                                                             char const *str,
                                                             gpointer user);
    void                go_data_emit_changed                (GOData *dat);
    double*             go_data_get_values                  (GOData *data);
    void                go_data_get_bounds                  (GOData *data,
                                                             double *minimum,
                                                             double *maximum);
    gboolean            go_data_is_increasing               (GOData *data);
    gboolean            go_data_is_decreasing               (GOData *data);
    gboolean            go_data_is_varying_uniformly        (GOData *data);
    unsigned int        go_data_get_n_dimensions            (GOData *data);
    unsigned int        go_data_get_n_values                (GOData *data);
    unsigned int        go_data_get_vector_size             (GOData *data);
    void                go_data_get_matrix_size             (GOData *data,
                                                             unsigned int *n_rows,
                                                             unsigned int *n_columns);
    double              go_data_get_scalar_value            (GOData *data);
    double              go_data_get_vector_value            (GOData *data,
                                                             unsigned int column);
    double              go_data_get_matrix_value            (GOData *data,
                                                             unsigned int row,
                                                             unsigned int column);
    char*               go_data_get_scalar_string           (GOData *data);
    char*               go_data_get_vector_string           (GOData *data,
                                                             unsigned int column);
    char*               go_data_get_matrix_string           (GOData *data,
                                                             unsigned int row,
                                                             unsigned int column);

## Object Hierarchy

      GObject
       +----GOData
             +----GODataScalar
             +----GODataVector
             +----GODataMatrix

## Signals

      "changed"                                        : Run Last

## Description

## Details

### GOData

    typedef struct _GOData GOData;

### GODataClass

    typedef struct {
    	GObjectClass base;

    	GOData *	(*dup)	    		(GOData const *src);
    	gboolean 	(*eq)	    		(GOData const *a, GOData const *b);
    	GOFormat *	(*preferred_fmt) 	(GOData const *dat);
    	GODateConventions const *(*date_conv) 	(GOData const *dat);

    	char *		(*serialize)	    	(GOData const *dat, gpointer user);
    	gboolean   	(*unserialize)	    	(GOData *dat, char const *str, gpointer user);
    	void	   	(*emit_changed)  	(GOData *dat);

    	unsigned int	(*get_n_dimensions)	(GOData *data);
    	void		(*get_sizes)		(GOData *data, unsigned int *sizes);
    	double *	(*get_values)		(GOData *data);
    	void		(*get_bounds)		(GOData *data, double *minimum, double *maximum);
    	double		(*get_value)		(GOData *data, unsigned int *coordinates);
    	char *		(*get_string)		(GOData *data, unsigned int *coordinates);

    	/* signals */
    	void (*changed)	(GOData *dat);
    } GODataClass;

### go_data_dup ()

    GOData*             go_data_dup                         (GOData const *src);

`src` : | GOData
Returns : | A deep copy of `src`.

### go_data_eq ()

    gboolean            go_data_eq                          (GOData const *a,
                                                             GOData const *b);

`a` : | GOData
`b` : | GOData
Returns : | TRUE if `a` and `b` are the same

### go_data_preferred_fmt ()

    GOFormat*           go_data_preferred_fmt               (GOData const *dat);

Caller is responsible for unrefing the result.

`dat` : | GOData
Returns : | the fmt preferred by the the data

### go_data_date_conv ()

    GODateConventionsconst * go_data_date_conv              (GOData const *dat);

`dat` : | GOData
Returns : | the date conventions used by the data, or NULL if not determined.

### go_data_serialize ()

    char*               go_data_serialize                   (GOData const *dat,
                                                             gpointer user);

NOTE : This is the _source_ not the content. (I.e., this refers to the expression, not its current value.)

`dat` : | GOData
`user` : | a gpointer describing the context.
Returns : | a string representation of the data source that the caller is responsible for freeing

### go_data_unserialize ()

    gboolean            go_data_unserialize                 (GOData *dat,
                                                             char const *str,
                                                             gpointer user);

De-serializes the source information returned from go_data_serialize.

`dat` : | GOData
`str` : | string to parse
`user` : | a gpointer describing the context.
Returns : | `FALSE` on error.

### go_data_emit_changed ()

    void                go_data_emit_changed                (GOData *dat);

protected utility to emit a 'changed' signal

`dat` : | GOData

### go_data_get_values ()

    double*             go_data_get_values                  (GOData *data);

`data` : |
Returns : |

### go_data_get_bounds ()

    void                go_data_get_bounds                  (GOData *data,
                                                             double *minimum,
                                                             double *maximum);

`data` : |
`minimum` : |
`maximum` : |

### go_data_is_increasing ()

    gboolean            go_data_is_increasing               (GOData *data);

`data` : |
Returns : |

### go_data_is_decreasing ()

    gboolean            go_data_is_decreasing               (GOData *data);

`data` : |
Returns : |

### go_data_is_varying_uniformly ()

    gboolean            go_data_is_varying_uniformly        (GOData *data);

`data` : |
Returns : |

### go_data_get_n_dimensions ()

    unsigned int        go_data_get_n_dimensions            (GOData *data);

`data` : |
Returns : |

### go_data_get_n_values ()

    unsigned int        go_data_get_n_values                (GOData *data);

`data` : |
Returns : |

### go_data_get_vector_size ()

    unsigned int        go_data_get_vector_size             (GOData *data);

`data` : |
Returns : |

### go_data_get_matrix_size ()

    void                go_data_get_matrix_size             (GOData *data,
                                                             unsigned int *n_rows,
                                                             unsigned int *n_columns);

`data` : |
`n_rows` : |
`n_columns` : |

### go_data_get_scalar_value ()

    double              go_data_get_scalar_value            (GOData *data);

`data` : |
Returns : |

### go_data_get_vector_value ()

    double              go_data_get_vector_value            (GOData *data,
                                                             unsigned int column);

`data` : |
`column` : |
Returns : |

### go_data_get_matrix_value ()

    double              go_data_get_matrix_value            (GOData *data,
                                                             unsigned int row,
                                                             unsigned int column);

`data` : |
`row` : |
`column` : |
Returns : |

### go_data_get_scalar_string ()

    char*               go_data_get_scalar_string           (GOData *data);

`data` : |
Returns : |

### go_data_get_vector_string ()

    char*               go_data_get_vector_string           (GOData *data,
                                                             unsigned int column);

`data` : |
`column` : |
Returns : |

### go_data_get_matrix_string ()

    char*               go_data_get_matrix_string           (GOData *data,
                                                             unsigned int row,
                                                             unsigned int column);

`data` : |
`row` : |
`column` : |
Returns : |

## Signal Details

### The `"changed"` signal

    void                user_function                      (GOData  *godata,
                                                            gpointer user_data)      : Run Last

`godata` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.