v_sim.ScalarfieldSet

g GObject.Object GObject.Object v_sim.ScalarfieldSet v_sim.ScalarfieldSet GObject.Object->v_sim.ScalarfieldSet

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

getDefault ()

class

new ()

add (label, field)

addFromFile (meth, filename, table, cancel, callback, *user_data)

addFromFileSync (meth, filename, table, cancel)

getAt (i)

getLabel (field)

getLength ()

iter_new ()

remove (field)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

n-fields

int

r

number of fields

Signals

Inherited:

GObject.Object (1)

Name

Short Description

added

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

removed

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

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

v_sim.ScalarfieldSetPrivate

r

Class Details

class v_sim.ScalarfieldSet(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.ScalarfieldSetClass

Common name to refer to a #_VisuScalarfieldSet.

classmethod getDefault()
Returns:

the default v_sim.ScalarfieldSet object.

Return type:

v_sim.ScalarfieldSet

Retrieve the default storage for v_sim.ScalarField objects.

New in version 3.8.

classmethod new()
Returns:

the newly created object.

Return type:

v_sim.ScalarfieldSet

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

New in version 3.8.

add(label, field)
Parameters:
Returns:

False if field was already registered.

Return type:

bool

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

New in version 3.8.

addFromFile(meth, filename, table, cancel, callback, *user_data)
Parameters:
Returns:

True if everything goes with no error.

Return type:

bool

Read the given file and try to load it as a scalar field file. If succeed, all read fields are added to self. 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 None, then all known methods are used to parse filename.

This is an asynchronous method. Use v_sim.ScalarfieldSet.addFromFileSync() for a blocking equivalent.

New in version 3.8.

addFromFileSync(meth, filename, table, cancel)
Parameters:
Raises:

GLib.Error

Returns:

True if everything goes with no error.

Return type:

bool

As v_sim.ScalarfieldSet.addFromFileSync(), but blocking variant.

New in version 3.8.

getAt(i)
Parameters:

i (int) – an index.

Returns:

a v_sim.ScalarField object or None index is out of bounds.

Return type:

v_sim.ScalarField or None

Retrieve the field stored at index i.

New in version 3.8.

getLabel(field)
Parameters:

field (v_sim.ScalarField) – a v_sim.ScalarField object.

Returns:

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

Return type:

str

Retrieve the label that has been associated to field.

New in version 3.8.

getLength()
Returns:

the size of the set.

Return type:

int

Retrieve the number of fields stored in self.

New in version 3.8.

iter_new()
Returns:

True if iterator is valid (i.e. there are fields in self).

iter:

the iterator to create.

Return type:

(bool, iter: v_sim.ScalarfieldSetIter)

Creates an iterator on the internal storage of v_sim.ScalarField objects.

New in version 3.8.

remove(field)
Parameters:

field (v_sim.ScalarField) – a v_sim.ScalarField object.

Returns:

True if field was found and removed.

Return type:

bool

Remove field from the list of stored fields.

New in version 3.8.

Signal Details

v_sim.ScalarfieldSet.signals.added(scalarfield_set, field)
Signal Name:

added

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

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

New in version 3.8.

v_sim.ScalarfieldSet.signals.removed(scalarfield_set, field)
Signal Name:

removed

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

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

New in version 3.8.

Property Details

v_sim.ScalarfieldSet.props.n_fields
Name:

n-fields

Type:

int

Default Value:

0

Flags:

READABLE

number of fields