SPH
src
core
run
jobs
ScriptJobs.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
run/Job.h
"
4
5
NAMESPACE_SPH_BEGIN
6
7
#ifdef SPH_USE_CHAISCRIPT
8
9
class
ChaiScriptJob :
public
IParticleJob
{
10
private
:
11
Path
file =
Path
(
"script.chai"
);
12
13
int
inputCnt = 8;
// needs to be max for proper loading ...
14
StaticArray<std::string, 8>
slotNames;
15
16
int
paramCnt = 8;
17
StaticArray<std::string, 8>
paramNames;
18
StaticArray<Float, 8>
paramValues;
19
20
public
:
21
ChaiScriptJob(
const
std::string& name);
22
23
virtual
std::string
className
()
const override
{
24
return
"custom script"
;
25
}
26
27
virtual
UnorderedMap<std::string, ExtJobType>
getSlots
()
const override
;
28
29
virtual
VirtualSettings
getSettings
()
override
;
30
31
virtual
void
evaluate
(
const
RunSettings
& global,
IRunCallbacks
&
UNUSED
(callbacks))
override
;
32
};
33
34
#endif
35
36
NAMESPACE_SPH_END
NAMESPACE_SPH_BEGIN
NAMESPACE_SPH_BEGIN
Definition:
BarnesHut.cpp:13
Job.h
UNUSED
#define UNUSED(x)
Definition:
Object.h:37
NAMESPACE_SPH_END
#define NAMESPACE_SPH_END
Definition:
Object.h:12
IJob::getSlots
virtual UnorderedMap< std::string, ExtJobType > getSlots() const =0
Lists all potential inputs of the job.
IJob::getSettings
virtual VirtualSettings getSettings()=0
Returns a settings object which allows to query and modify the state of the job.
IJob::className
virtual std::string className() const =0
Name representing the type of the job (e.e. "SPH").
IJob::evaluate
virtual void evaluate(const RunSettings &global, IRunCallbacks &callbacks)=0
Runs the operation provided by the job.
IParticleJob
Base class for all jobs providing particle data.
Definition:
Job.h:242
IRunCallbacks
Callbacks executed by the simulation to provide feedback to the user.
Definition:
IRun.h:27
Path
Object representing a path on a filesystem.
Definition:
Path.h:17
Settings< RunSettingsId >
StaticArray
Array with fixed number of allocated elements.
Definition:
StaticArray.h:19
UnorderedMap
Definition:
UnorderedMap.h:14
VirtualSettings
Holds a map of virtual entries, associated with a unique name.
Definition:
VirtualSettings.h:229
Generated by
1.9.1