VisuDataLoadable

VisuDataLoadable — a base class for all loadable representation of VisuData objects.

Functions

Properties

gboolean auto-refresh Read / Write
gchar * label Read
gboolean loading Read
guint n-files Read / Write / Construct Only
guint refresh-period Read / Write
gchar * status Read

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuNodeArray
            ╰── VisuData
                ╰── VisuDataLoadable
                    ╰── VisuDataAtomic

Description

VisuData is a memory representation of node data. This class is defining common methods for all VisuDataLoadable object that provide disk method to load VisuData objects.

Functions

visu_data_loadable_getErrorQuark ()

GQuark
visu_data_loadable_getErrorQuark (void);

Internal function to handle error.

Returns

a GQuark for VisuDataLoadable method errors.


visu_data_loadable_new_fromCLI ()

VisuDataLoadable *
visu_data_loadable_new_fromCLI (void);

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

Returns

a newly allocated VisuData if required.

[transfer full]


visu_data_loadable_checkFile ()

gboolean
visu_data_loadable_checkFile (VisuDataLoadable *self,
                              guint fileType,
                              GError **error);

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

Parameters

self

a VisuDataLoadable object.

 

fileType

a file type.

 

error

an error location.

 

Returns

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

Since: 3.8


visu_data_loadable_load ()

gboolean
visu_data_loadable_load (VisuDataLoadable *self,
                         guint iSet,
                         GCancellable *cancel,
                         GError **error);

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

Parameters

self

a VisuDataLoadable object.

 

iSet

an integer.

 

cancel

a cancellation object.

[allow-none]

error

an error location.

 

Returns

TRUE if delf is successfully loaded.

Since: 3.8


visu_data_loadable_reload ()

gboolean
visu_data_loadable_reload (VisuDataLoadable *self,
                           GCancellable *cancel,
                           GError **error);

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

Parameters

self

a VisuDataLoadable object.

 

cancel

a cancellation object.

[allow-none]

error

an error location.

 

Returns

TRUE if reload of self is successful.

Since: 3.8

Types and Values

struct VisuDataLoadableClass

struct VisuDataLoadableClass {
  VisuDataClass parent;

  void (*addFilename) (VisuDataLoadable *self, const gchar *filename,
                       guint fileType, VisuDataLoader *format);
  const gchar* (*getFilename) (const VisuDataLoadable *self,
                               guint fileType, VisuDataLoader **format);
  gboolean (*load) (VisuDataLoadable *self, guint iSet,
                    GCancellable *cancel, GError **error);
};

The VisuDataLoadableClass definition.

Members

VisuDataClass parent;

the parent class.

 

addFilename ()

a method used to set the filename for a specific type.

 

getFilename ()

a method used to get the filename associated to specific type.

 

load ()

the loading method.

 

Since: 3.8


enum VisuDataLoadableErrorFlag

Thiese are flags used when reading a file with a VisuDataLoadable method.

Members

DATA_LOADABLE_ERROR_METHOD

Error from the VisuDataLoadable method.

 

DATA_LOADABLE_ERROR_FILE

Error when opening.

 

DATA_LOADABLE_ERROR_FORMAT

Wrongness in format.

 

DATA_LOADABLE_ERROR_UNKNOWN

an error without specification.

 

DATA_LOADABLE_ERROR_CANCEL

the VisuDataLoadable operation has been cancelled.

 

Property Details

The “auto-refresh” property

  “auto-refresh”             gboolean

automatically reload on modification.

Flags: Read / Write

Default value: FALSE


The “label” property

  “label”                    gchar *

representation of the filenames.

Flags: Read

Default value: "No input files"


The “loading” property

  “loading”                  gboolean

TRUE when a file is loading.

Flags: Read

Default value: FALSE


The “n-files” property

  “n-files”                  guint

number of input files.

Flags: Read / Write / Construct Only

Allowed values: [1,10]

Default value: 1


The “refresh-period” property

  “refresh-period”           guint

Refresh period in seconds.

Flags: Read / Write

Allowed values: [1,3600]

Default value: 1


The “status” property

  “status”                   gchar *

loading status.

Flags: Read

Default value: ""