Uranium
Application Framework
Loading...
Searching...
No Matches
UM.FileHandler.WriteFileJob.WriteFileJob Class Reference

A Job subclass that performs writing. More...

Inheritance diagram for UM.FileHandler.WriteFileJob.WriteFileJob:
UM.Job.Job UM.Mesh.WriteMeshJob.WriteMeshJob

Public Member Functions

 __init__ (self, writer, stream, data, mode)
 Creates a new job for writing.
 
 setFileName (self, name)
 
 getFileName (self)
 
 getStream (self)
 
 setMessage (self, message)
 Set the message associated with this job.
 
 getMessage (self)
 
 run (self)
 Perform the actual task of this job.
 
- Public Member Functions inherited from UM.Job.Job
 __init__ (self)
 
 run (self)
 Perform the actual task of this job.
 
 getResult (self)
 Get the result of the job.
 
 setResult (self, any result)
 Set the result of this job.
 
 setError (self, Exception error)
 Set an exception that was thrown while the job was being executed.
 
 start (self)
 Start the job.
 
 cancel (self)
 Cancel the job.
 
bool isRunning (self)
 Check whether the job is currently running.
 
bool isFinished (self)
 Check whether the job has finished processing.
 
bool hasError (self)
 Check whether the Job has encountered an error during execution.
 
Exception getError (self)
 Get the error that was encountered during execution.
 

Protected Member Functions

 _onFinished (self, job)
 
 _onProgress (self, job, amount)
 

Protected Attributes

 _stream
 
 _writer
 
 _data
 
 _file_name
 
 _mode
 
 _message
 
 _onProgress
 
 _onFinished
 
- Protected Attributes inherited from UM.Job.Job
 _running
 
 _finished
 
 _result
 
 _error
 

Additional Inherited Members

- Static Public Member Functions inherited from UM.Job.Job
 yieldThread ()
 Utility function that allows us to yield thread processing.
 
- Static Public Attributes inherited from UM.Job.Job
 finished = Signal()
 Emitted when the job has finished processing.
 
 progress = Signal()
 Emitted when the job processing has progressed.
 

Detailed Description

A Job subclass that performs writing.

The writer defines what the result of this job is.

Constructor & Destructor Documentation

◆ __init__()

UM.FileHandler.WriteFileJob.WriteFileJob.__init__ (   self,
  writer,
  stream,
  data,
  mode 
)

Creates a new job for writing.

Parameters
writerThe file writer to use, with the correct MIME type.
streamThe output stream to write to.
dataWhatever it is what we want to write.
modeAdditional information to send to the writer, for example: such as whether to write in binary format or in ASCII format.

Reimplemented from UM.Job.Job.

Reimplemented in UM.Mesh.WriteMeshJob.WriteMeshJob.

Member Function Documentation

◆ run()

UM.FileHandler.WriteFileJob.WriteFileJob.run (   self)

Perform the actual task of this job.

Should be reimplemented by subclasses.

Exceptions
NotImplementedError

Reimplemented from UM.Job.Job.


The documentation for this class was generated from the following file: