SPH
Public Member Functions | Protected Attributes | List of all members
IParticleJob Class Reference

Base class for all jobs providing particle data. More...

#include <Job.h>

Inheritance diagram for IParticleJob:
IJob Polymorphic BatchJob CenterParticlesJob ChangeMaterialJob CollisionGeometrySetup CompareJob DifferentiatedBodyIc EmplaceComponentsAsFlagsJob EquilibriumIc ExtractComponentJob ExtractParticlesInDomainJob FileSequenceJob GalaxyIc IRunJob IsothermalSphereIc JoinParticlesJob LoadFileJob MergeComponentsJob ModifyQuantityIc MonolithicBodyIc MultiJoinParticlesJob NBodyIc NoiseQuantityIc OrbitParticlesJob PolytropicStarIc RemoveParticlesJob SaveFileJob SaveMeshJob SingleParticleIc SmoothedToSolidHandoff SubsampleJob TransformParticlesJob

Public Member Functions

 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 std::string instanceName () const
 Unique name representing this job. More...
 
virtual std::string className () const =0
 Name representing the type of the job (e.e. "SPH"). More...
 
virtual UnorderedMap< std::string, ExtJobTyperequires () const
 List of slots that need to be connected to evaluate the job. More...
 
virtual UnorderedMap< std::string, ExtJobTypegetSlots () const =0
 Lists all potential inputs of the job. More...
 
virtual VirtualSettings getSettings ()=0
 Returns a settings object which allows to query and modify the state of the job. More...
 
virtual void evaluate (const RunSettings &global, IRunCallbacks &callbacks)=0
 Runs the operation provided by the job. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Protected Attributes

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...
 

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...
 

Detailed Description

Base class for all jobs providing particle data.

Definition at line 242 of file Job.h.

Constructor & Destructor Documentation

◆ IParticleJob()

IParticleJob::IParticleJob ( const std::string &  name)
explicit

Definition at line 105 of file Job.cpp.

◆ ~IParticleJob()

IParticleJob::~IParticleJob ( )
overridedefault

Member Function Documentation

◆ getResult()

virtual JobContext IParticleJob::getResult ( ) const
inlinefinaloverridevirtual

Returns the result of the job.

This can only be called after the job is evaluated. The result is cached by the job, so the function getResult can be called multiple times once the job finishes.

Implements IJob.

Definition at line 256 of file Job.h.

◆ provides()

virtual Optional<ExtJobType> IParticleJob::provides ( ) const
inlinefinaloverridevirtual

Specifies the type of the job, i.e. what kind of data the job provides.

May be NOTHING for jobs like "save file", etc.

Implements IJob.

Definition at line 252 of file Job.h.

Member Data Documentation

◆ result

SharedPtr<ParticleData> IParticleJob::result
protected

Data filled by the job when it finishes.

Definition at line 245 of file Job.h.


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