toolArray

toolArray — read text files formated in columns.

Functions

Types and Values

Description

Defines various routines to read text files formatted in columns.

Functions

tool_array_getErrorQuark ()

GQuark
tool_array_getErrorQuark ();

Internal routine for error handling.

Returns

the GQuark associated to errors related to data files.

[transfer none]

Since: 3.8


tool_array_fromFile ()

GArray *
tool_array_fromFile (const gchar *filename,
                     guint *nColumns,
                     GError **error);

Read a data column file.

Parameters

filename

a filename.

[type filename]

nColumns

a location for an integer.

[out caller-allocates]

error

an error location.

 

Returns

a newly allocated GArray.

[transfer full][element-type float]

Since: 3.8


tool_array_sizedFromFile ()

GArray *
tool_array_sizedFromFile (const gchar *filename,
                          guint size,
                          guint *nColumns,
                          GError **error);

Like tool_array_fromFile(), but check that the number of read lines corresponds to the expected value given by size .

Parameters

filename

a path;

 

size

expected number of read lines;

 

nColumns

number of read columns;.

[out caller-allocates]

error

an error pointer.

 

Returns

a newly allocated GArray.

[transfer full][element-type float]

Since: 3.8

Types and Values

TOOL_ARRAY_ERROR

#define TOOL_ARRAY_ERROR tool_array_getErrorQuark()

Internal function for error handling.


enum ToolArrayErrorFlag

Possible errors when reading a file with column data.

Members

TOOL_ARRAY_ERROR_NO_COLUMN

no column can be found in the file ;

 

TOOL_ARRAY_ERROR_MISSING_DATA

some data are missing to match the required number of read data.