v_sim.DataLoadable

g GObject.GInterface GObject.GInterface v_sim.Boxed v_sim.Boxed GObject.GInterface->v_sim.Boxed v_sim.Maskable v_sim.Maskable GObject.GInterface->v_sim.Maskable v_sim.Pointset v_sim.Pointset GObject.GInterface->v_sim.Pointset GObject.Object GObject.Object v_sim.NodeArray v_sim.NodeArray GObject.Object->v_sim.NodeArray v_sim.Data v_sim.Data v_sim.Boxed->v_sim.Data v_sim.DataLoadable v_sim.DataLoadable v_sim.Data->v_sim.DataLoadable v_sim.Maskable->v_sim.NodeArray v_sim.NodeArray->v_sim.Data v_sim.Pointset->v_sim.Data

Subclasses:

v_sim.DataAtomic

Methods

Inherited:

v_sim.Data (24), v_sim.NodeArray (55), GObject.Object (37), v_sim.Maskable (3), v_sim.Boxed (2), v_sim.Pointset (9)

Structs:

GObject.ObjectClass (5)

class

getErrorQuark ()

class

new_fromCLI ()

checkFile (fileType)

getFilename (type)

getNSets ()

getSetId ()

getSetLabel (iSet)

load (iSet, cancel)

reload (cancel)

setNSets (nSets)

setSetLabel (label, iSet)

Virtual Methods

Inherited:

GObject.Object (7), v_sim.Maskable (1), v_sim.Boxed (1), v_sim.Pointset (5)

do_getFilename (type)

do_load (iSet, cancel)

Properties

Inherited:

v_sim.Data (2), v_sim.NodeArray (3), v_sim.Boxed (2), v_sim.Pointset (4)

Name

Type

Flags

Short Description

auto-refresh

bool

r/w

automatically reload on modification

label

str

r

representation of the filenames

loading

bool

r

True when a file is loading

n-files

int

r/w/co

number of input files

refresh-period

int

r/w

Refresh period in seconds

status

str

r

loading status

Signals

Inherited:

v_sim.Data (2), v_sim.NodeArray (5), GObject.Object (1), v_sim.Maskable (1), v_sim.Boxed (1)

Fields

Inherited:

v_sim.Data (2), v_sim.NodeArray (5), GObject.Object (1), v_sim.Maskable (1), v_sim.Boxed (1)

Name

Type

Access

Description

parent

v_sim.Data

r

Class Details

class v_sim.DataLoadable(**kwargs)
Bases:

v_sim.Data

Abstract:

No

Structure:

v_sim.DataLoadableClass

An opaque structure storing v_sim.DataLoadable objects.

New in version 3.8.

classmethod getErrorQuark()
Returns:

a #GQuark for v_sim.DataLoadable method errors.

Return type:

int

Internal function to handle error.

classmethod new_fromCLI()
Returns:

a newly allocated v_sim.Data if required.

Return type:

v_sim.DataLoadable

Read the command line option and set the filenames for a new v_sim.Data. The object is not loaded (files are not parsed), just prepared.

checkFile(fileType)
Parameters:

fileType (int) – a file type.

Raises:

GLib.Error

Returns:

True if the file set for fileType is a valid file.

Return type:

bool

Tests if the provided file for a given fileType is a valid file.

New in version 3.8.

getFilename(type)
Parameters:

type (int) – when the loadable is multi-files, the type of file.

Returns:

a filename.

Return type:

str

Returns the source filename for type.

New in version 3.8.

getNSets()
Returns:

the set number of sets that has been read.

Return type:

int

Some loadable format can store several v_sim.Data (like a MD trajectory), see the iSet attribute in v_sim.DataLoadable.load().

New in version 3.8.

getSetId()
Returns:

the set id that has been loaded.

Return type:

int

Some loadable format can store several v_sim.Data (like a MD trajectory), see the iSet attribute in v_sim.DataLoadable.load().

New in version 3.8.

getSetLabel(iSet)
Parameters:

iSet (int) – an id.

Returns:

a label.

Return type:

str

Retrieves a possible label for the given set. If iSet is the currently loaded set, then this method is equivalent to calling v_sim.Data.getDescription().

New in version 3.8.

load(iSet, cancel)
Parameters:
Raises:

GLib.Error

Returns:

True if delf is successfully loaded.

Return type:

bool

Call the load class method of self. Also store the last read time for each file of self.

New in version 3.8.

reload(cancel)
Parameters:

cancel (Gio.Cancellable or None) – a cancellation object.

Raises:

GLib.Error

Returns:

True if reload of self is successful.

Return type:

bool

A wrapper to load again the same sub set of self.

New in version 3.8.

setNSets(nSets)
Parameters:

nSets (int) – a positive number.

Returns:

True if the actual number of sets for self has changed.

Return type:

bool

Setup the number of v_sim.Data that self is storing on disk.

New in version 3.8.

setSetLabel(label, iSet)
Parameters:
  • label (str) – the message to be stored (null terminated) ;

  • iSet (int) – an integer.

This method is used to store a description of the given data. Before using this method, the number of possible node sets must have been defined using v_sim.DataLoadable.setNSets(), if not, only iSet == 0 is allowed.

do_getFilename(type) virtual
Parameters:

type (int) – when the loadable is multi-files, the type of file.

Returns:

a filename.

Return type:

str

Returns the source filename for type.

New in version 3.8.

do_load(iSet, cancel) virtual
Parameters:
Returns:

True if delf is successfully loaded.

Return type:

bool

Call the load class method of self. Also store the last read time for each file of self.

New in version 3.8.

Property Details

v_sim.DataLoadable.props.auto_refresh
Name:

auto-refresh

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

automatically reload on modification

v_sim.DataLoadable.props.label
Name:

label

Type:

str

Default Value:

'No input files'

Flags:

READABLE

representation of the filenames

v_sim.DataLoadable.props.loading
Name:

loading

Type:

bool

Default Value:

False

Flags:

READABLE

True when a file is loading

v_sim.DataLoadable.props.n_files
Name:

n-files

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

number of input files

v_sim.DataLoadable.props.refresh_period
Name:

refresh-period

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE

Refresh period in seconds

v_sim.DataLoadable.props.status
Name:

status

Type:

str

Default Value:

''

Flags:

READABLE

loading status