SPH
Public Member Functions | List of all members
IJobDesc Class Referenceabstract

Provides a descriptor of a job that allows to create new instances. More...

#include <Job.h>

Inheritance diagram for IJobDesc:
Polymorphic

Public Member Functions

virtual std::string className () const =0
 Returns the class name of the job. More...
 
virtual std::string category () const =0
 Returns a name of the category of job. More...
 
virtual std::string tooltip () const
 Returns a help message, explaining what the job does and how it should be used. More...
 
virtual AutoPtr< IJobcreate (Optional< std::string > instanceName) const =0
 Creates a new job instance. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Provides a descriptor of a job that allows to create new instances.

This is mainly intended to provide a way to enumerate all available jobs and create new instances of jobs without having a specific type at hand. Each class derived from IJob should be associated with one IJobDesc implementation. It is not necessary to implement this interface manually, consider using helper class JobRegistrar.

Definition at line 170 of file Job.h.

Member Function Documentation

◆ category()

virtual std::string IJobDesc::category ( ) const
pure virtual

Returns a name of the category of job.

There is no predefined list of categories, it can be anything that describes the job, for example "simulations", "initial conditions", etc. For consistency, use plural nouns as in the examples.

◆ className()

virtual std::string IJobDesc::className ( ) const
pure virtual

Returns the class name of the job.

It must be the same name as returned by IJob::className. It is necessary to duplicate the name here, as we need to get the class name without having to create a new instance of the job.

◆ create()

virtual AutoPtr<IJob> IJobDesc::create ( Optional< std::string >  instanceName) const
pure virtual

Creates a new job instance.

Parameters
instanceNameName of the instance, may be NOTHING in which case a generic name will be assigned based on the class name.

◆ tooltip()

virtual std::string IJobDesc::tooltip ( ) const
inlinevirtual

Returns a help message, explaining what the job does and how it should be used.

Definition at line 185 of file Job.h.


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