SPH
Public Member Functions | List of all members
LoadFileJob Class Reference

#include <IoJobs.h>

Inheritance diagram for LoadFileJob:
IParticleJob IJob Polymorphic

Public Member Functions

 LoadFileJob (const Path &path=Path("file.ssf"))
 
virtual std::string instanceName () const override
 Unique name representing this job. More...
 
virtual std::string className () const override
 Name representing the type of the job (e.e. "SPH"). More...
 
virtual UnorderedMap< std::string, ExtJobTypegetSlots () const override
 Lists all potential inputs of the job. More...
 
virtual VirtualSettings getSettings () override
 Returns a settings object which allows to query and modify the state of the job. More...
 
virtual void evaluate (const RunSettings &global, IRunCallbacks &callbacks) override
 Runs the operation provided by the job. More...
 
- Public Member Functions inherited from IParticleJob
 IParticleJob (const std::string &name)
 
 ~IParticleJob () override
 
virtual Optional< ExtJobTypeprovides () const override final
 Specifies the type of the job, i.e. what kind of data the job provides. More...
 
virtual JobContext getResult () const override final
 Returns the result of the job. More...
 
- Public Member Functions inherited from IJob
 IJob (const std::string &name)
 
virtual UnorderedMap< std::string, ExtJobTyperequires () const
 List of slots that need to be connected to evaluate the job. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Additional Inherited Members

- Protected Member Functions inherited from IJob
template<typename T >
SharedPtr< T > getInput (const std::string &name) const
 Convenient function to return input data for slot of given name. More...
 
- Protected Attributes inherited from IParticleJob
SharedPtr< ParticleDataresult
 Data filled by the job when it finishes. More...
 
- Protected Attributes inherited from IJob
std::string instName
 
UnorderedMap< std::string, JobContextinputs
 Contains all input data, identified by names of input slots. More...
 

Detailed Description

Definition at line 14 of file IoJobs.h.

Constructor & Destructor Documentation

◆ LoadFileJob()

LoadFileJob::LoadFileJob ( const Path path = Path("file.ssf"))
inline

Definition at line 20 of file IoJobs.h.

Member Function Documentation

◆ className()

virtual std::string LoadFileJob::className ( ) const
inlineoverridevirtual

Name representing the type of the job (e.e. "SPH").

Implements IJob.

Definition at line 32 of file IoJobs.h.

◆ evaluate()

void LoadFileJob::evaluate ( const RunSettings global,
IRunCallbacks callbacks 
)
overridevirtual

Runs the operation provided by the job.

Function may be called only after required inputs are assigned; this is provided by class JobNode, the job should not be used directly.

Parameters
globalGlobal settings, shared by all jobs. Contains parameters like number of threads, etc.
callbacksInterface allowing to get notified about current progress of the job.
Exceptions
InvalidSetupif required input is missing or job encountered a problem in initialization.

Implements IJob.

Definition at line 36 of file IoJobs.cpp.

◆ getSettings()

VirtualSettings LoadFileJob::getSettings ( )
overridevirtual

Returns a settings object which allows to query and modify the state of the job.

It is not necessary to expose all state variables this way. This is mainly intended for (de)serialization of the job state and for connection with UI controls.

Implements IJob.

Definition at line 24 of file IoJobs.cpp.

◆ getSlots()

virtual UnorderedMap<std::string, ExtJobType> LoadFileJob::getSlots ( ) const
inlineoverridevirtual

Lists all potential inputs of the job.

This is the superset of slots returned by function requires and it has to be fixed, i.e. cannot change when internal state of the job changes.

Implements IJob.

Definition at line 36 of file IoJobs.h.

◆ instanceName()

virtual std::string LoadFileJob::instanceName ( ) const
inlineoverridevirtual

Unique name representing this job.

Reimplemented from IJob.

Definition at line 24 of file IoJobs.h.


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