v_sim.ScalarfieldSet¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
number of fields |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
This signal is emitted each time a field is added to the set. |
|
This signal is emitted each time a field is removed from the set. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
||
priv |
r |
Class Details¶
- class v_sim.ScalarfieldSet(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Common name to refer to a #_VisuScalarfieldSet.
- classmethod getDefault()¶
- Returns:
the default
v_sim.ScalarfieldSetobject.- Return type:
Retrieve the default storage for
v_sim.ScalarFieldobjects.Added in version 3.8.
- classmethod new()¶
- Returns:
the newly created object.
- Return type:
Creates an object to store several fields and do hiding operations with them.
Added in version 3.8.
- add(label, field)¶
- Parameters:
label (
str) – a string.field (
v_sim.ScalarField) – av_sim.ScalarFieldobject.
- Returns:
Falseif field was already registered.- Return type:
Adds a field to the list of stored fields. label is not necessarily unique in he set.
Added in version 3.8.
- addFromFile(meth, filename, table, cancel, callback, *user_data)¶
- Parameters:
meth (
v_sim.ScalarFieldMethodorNone) – av_sim.ScalarFieldMethodobject.filename (
str) – the path to the file to be loaded ;table ({
object:object} orNone) – a set of different options (can beNone).cancel (
Gio.CancellableorNone) – aGio.Cancellableobject.callback (
Gio.AsyncReadyCallbackorNone) – a method to call when the load finishes.
- Returns:
Trueif everything goes with no error.- Return type:
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.Added in version 3.8.
- addFromFileSync(meth, filename, table, cancel)¶
- Parameters:
meth (
v_sim.ScalarFieldMethodorNone) – av_sim.ScalarFieldMethodobject.filename (
str) – the path to the file to be loaded ;table ({
object:object} orNone) – a set of different options (can beNone).cancel (
Gio.CancellableorNone) – aGio.Cancellableobject.
- Raises:
- Returns:
Trueif everything goes with no error.- Return type:
As
v_sim.ScalarfieldSet.addFromFileSync(), but blocking variant.Added in version 3.8.
- getAt(i)¶
- Parameters:
i (
int) – an index.- Returns:
a
v_sim.ScalarFieldobject orNoneindex is out of bounds.- Return type:
Retrieve the field stored at index i.
Added in version 3.8.
- getLabel(field)¶
- Parameters:
field (
v_sim.ScalarField) – av_sim.ScalarFieldobject.- Returns:
the label associated to field, if field belongs to self.
- Return type:
Retrieve the label that has been associated to field.
Added in version 3.8.
- getLength()¶
- Returns:
the size of the set.
- Return type:
Retrieve the number of fields stored in self.
Added in version 3.8.
- iter_new()¶
- Returns:
Trueif 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.ScalarFieldobjects.Added in version 3.8.
- remove(field)¶
- Parameters:
field (
v_sim.ScalarField) – av_sim.ScalarFieldobject.- Returns:
Trueif field was found and removed.- Return type:
Remove field from the list of stored fields.
Added in version 3.8.
Signal Details¶
- v_sim.ScalarfieldSet.signals.added(scalarfield_set, field)¶
- Signal Name:
added- Flags:
- Parameters:
scalarfield_set (
v_sim.ScalarfieldSet) – The object which received the signalfield (
v_sim.ScalarField) – the addedv_sim.ScalarFieldobject.
This signal is emitted each time a field is added to the set.
Added in version 3.8.
- v_sim.ScalarfieldSet.signals.removed(scalarfield_set, field)¶
- Signal Name:
removed- Flags:
- Parameters:
scalarfield_set (
v_sim.ScalarfieldSet) – The object which received the signalfield (
v_sim.ScalarField) – the removedv_sim.ScalarFieldobject.
This signal is emitted each time a field is removed from the set.
Added in version 3.8.