50 QStringList
evaluateClick(QObject *handler,
const QPointF coord,
const QString &grid_name);
51 double variableValueAt(QObject *handler,
const QPointF coord,
const int layer_id);
57 void error(QString error_msg);
68 static QJSValue
valueFromJs(
const QJSValue &js_value,
const QString &key,
const QString default_value=QLatin1Literal(
""),
const QString &errorMessage=QLatin1Literal(
""));
73 QList<BiteAgent*> mAgents;
75 QStringList mErrorStack;
80 QMultiHash<int, BiteAgent*> mTreeRemovalNotifiers;
Definition: biteagent.h:71
Definition: biteengine.h:30
void error(QString error_msg)
called from agents/items if an error occured during script execution
Definition: biteengine.cpp:217
static QJSValue valueFromJs(const QJSValue &js_value, const QString &key, const QString default_value=QLatin1Literal(""), const QString &errorMessage=QLatin1Literal(""))
Definition: biteengine.cpp:243
double variableValueAt(QObject *handler, const QPointF coord, const int layer_id)
Definition: biteengine.cpp:176
QStringList agentNames()
Definition: biteengine.cpp:131
QStringList evaluateClick(QObject *handler, const QPointF coord, const QString &grid_name)
Definition: biteengine.cpp:160
QJSEngine * scriptEngine()
Definition: biteengine.cpp:139
void run()
Definition: biteengine.cpp:192
BiteAgent * agentByName(QString name)
get agent by name
Definition: biteengine.cpp:123
void addAgent(BiteAgent *new_agent)
Definition: biteengine.cpp:104
~BiteEngine()
Definition: biteengine.cpp:51
int currentYear() const
Definition: biteengine.h:46
QMutex * serializeJS()
safe guard calls to the JS engine (only 1 thread allowed)
Definition: biteengine.h:60
void addTreeRemovalFunction(int reason, BiteAgent *agent)
Definition: biteengine.h:64
void setup()
Definition: biteengine.cpp:61
Grid< double > * preparePaintGrid(QObject *handler, QString name)
Definition: biteengine.cpp:146
static BiteEngine * instance()
get singleton of the BiteEngine
Definition: biteengine.h:33
void setYear(int year)
Definition: biteengine.h:47
void notifyTreeRemoval(Tree *tree, int reason)
called by iLand for every tree that is removed/harvested/died due to disturbance.
Definition: biteengine.cpp:227
Definition: biteoutput.h:27
Definition: bitescript.h:29
Grid class (template).
Definition: grid.h:44
A tree is the basic simulation entity of iLand and represents a single tree.
Definition: tree.h:44
Definition: biteagent.cpp:32