VisuScalarfieldSet

VisuScalarfieldSet — Defines a storage object to gather VisuScalarField objects.

Functions

Properties

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuScalarfieldSet

Description

A VisuScalarfieldSet object is a storage object for a bunch of VisuScalarField. This object provides methods to iterate over the internal storage.

Functions

visu_scalarfield_set_new ()

VisuScalarfieldSet *
visu_scalarfield_set_new ();

Creates an object to store several fields and do hiding operations with them.

Returns

the newly created object.

[transfer full]

Since: 3.8


visu_scalarfield_set_add ()

gboolean
visu_scalarfield_set_add (VisuScalarfieldSet *set,
                          const gchar *label,
                          VisuScalarField *field);

Adds a field to the list of stored fields. label is not necessarily unique in he set.

Parameters

set

a VisuScalarfieldSet object.

 

label

a string.

 

field

a VisuScalarField object.

[transfer none]

Returns

FALSE if field was already registered.

Since: 3.8


visu_scalarfield_set_addFromFile ()

gboolean
visu_scalarfield_set_addFromFile (VisuScalarfieldSet *set,
                                  VisuScalarFieldMethod *meth,
                                  const gchar *filename,
                                  GHashTable *table,
                                  GCancellable *cancel,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Read the given file and try to load it as a scalar field file. If succeed, all read fields are added to set . If table is given, it means that the caller routine gives some options to the loader routine. These options are a set of names and values. If meth is NULL, then all known methods are used to parse filename .

This is an asynchronous method. Use visu_scalarfield_set_addFromFileSync() for a blocking equivalent.

Parameters

set

a VisuScalarfieldSet object.

 

meth

a VisuScalarFieldMethod object.

[allow-none]

filename

the path to the file to be loaded ;.

[type filename]

table

a set of different options (can be NULL).

[allow-none]

cancel

a GCancellable object.

[allow-none]

callback

a method to call when the load finishes.

[allow-none]

user_data

some user data.

[scope async]

Returns

TRUE if everything goes with no error.

Since: 3.8


visu_scalarfield_set_addFromFileSync ()

gboolean
visu_scalarfield_set_addFromFileSync (VisuScalarfieldSet *set,
                                      VisuScalarFieldMethod *meth,
                                      const gchar *filename,
                                      GHashTable *table,
                                      GCancellable *cancel,
                                      GError **error);

As visu_scalarfield_set_addFromFileSync(), but blocking variant.

Parameters

set

a VisuScalarfieldSet object.

 

meth

a VisuScalarFieldMethod object.

[allow-none]

filename

the path to the file to be loaded ;.

[type filename]

table

a set of different options (can be NULL).

[allow-none]

cancel

a GCancellable object.

[allow-none]

error

an error location.

[allow-none]

Returns

TRUE if everything goes with no error.

Since: 3.8


visu_scalarfield_set_remove ()

gboolean
visu_scalarfield_set_remove (VisuScalarfieldSet *set,
                             VisuScalarField *field);

Remove field from the list of stored fields.

Parameters

set

a VisuScalarfieldSet object.

 

field

a VisuScalarField object.

 

Returns

TRUE if field was found and removed.

Since: 3.8


visu_scalarfield_set_getAt ()

VisuScalarField *
visu_scalarfield_set_getAt (const VisuScalarfieldSet *set,
                            guint i);

Retrieve the field stored at index i .

Parameters

set

a VisuScalarfieldSet object.

 

i

an index.

 

Returns

a VisuScalarField object or NULL index is out of bounds.

[transfer none][allow-none]

Since: 3.8


visu_scalarfield_set_getLength ()

guint
visu_scalarfield_set_getLength (const VisuScalarfieldSet *set);

Retrieve the number of fields stored in set .

Parameters

set

a VisuScalarfieldSet object.

 

Returns

the size of the set.

Since: 3.8


visu_scalarfield_set_getLabel ()

const gchar *
visu_scalarfield_set_getLabel (const VisuScalarfieldSet *set,
                               const VisuScalarField *field);

Retrieve the label that has been associated to field .

Parameters

set

a VisuScalarfieldSet object.

 

field

a VisuScalarField object.

 

Returns

the label associated to field , if field belongs to set .

Since: 3.8


visu_scalarfield_set_getDefault ()

VisuScalarfieldSet *
visu_scalarfield_set_getDefault (void);

Retrieve the default storage for VisuScalarField objects.

Returns

the default VisuScalarfieldSet object.

[transfer none]

Since: 3.8


visu_scalarfield_set_class_finalize ()

void
visu_scalarfield_set_class_finalize (void);

Cleanup function.

[skip]

Since: 3.8


visu_scalarfield_set_iter_new ()

gboolean
visu_scalarfield_set_iter_new (const VisuScalarfieldSet *set,
                               VisuScalarfieldSetIter *iter);

Creates an iterator on the internal storage of VisuScalarField objects.

Parameters

set

a VisuScalarfieldSet object.

 

iter

the iterator to create.

[out caller-allocates]

Returns

TRUE if iterator is valid (i.e. there are fields in set ).

Since: 3.8


visu_scalarfield_set_iter_next ()

gboolean
visu_scalarfield_set_iter_next (VisuScalarfieldSetIter *iter);

Use this function to iterate on field stored in a VisuScalarfieldSet object.

Parameters

iter

an iterator.

 

Returns

TRUE if any field remains.

Since: 3.8

Types and Values

struct VisuScalarfieldSet

struct VisuScalarfieldSet;

Common name to refer to a _VisuScalarfieldSet.


struct VisuScalarfieldSetClass

struct VisuScalarfieldSetClass {
  VisuObjectClass parent;
};

Common name to refer to a _VisuScalarfieldSetClass.

Members

VisuObjectClass parent;

private.

 

struct VisuScalarfieldSetIter

struct VisuScalarfieldSetIter {
  const VisuScalarfieldSet *set;
  VisuScalarField *field;

  GList *next;
};

Structure to iterate over the stored field of set .

Members

const VisuScalarfieldSet *set;

the VisuScalarfieldSet to iter on.

 

VisuScalarField *field;

the current VisuScalarField.

 

GList *next;

internal index.

[element-type gpointer]

Since: 3.8

Property Details

The “n-fields” property

  “n-fields”                 guint

number of fields.

Flags: Read

Default value: 0

Signal Details

The “added” signal

void
user_function (VisuScalarfieldSet *set,
               VisuScalarField    *field,
               gpointer            user_data)

This signal is emitted each time a field is added to the set.

Parameters

set

the object emitting the signal.

 

field

the added VisuScalarField object.

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks

Since: 3.8


The “removed” signal

void
user_function (VisuScalarfieldSet *set,
               VisuScalarField    *field,
               gpointer            user_data)

This signal is emitted each time a field is removed from the set.

Parameters

set

the object emitting the signal.

 

field

the removed VisuScalarField object.

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks

Since: 3.8