-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgtpy_task.h
More file actions
66 lines (54 loc) · 1.48 KB
/
gtpy_task.h
File metadata and controls
66 lines (54 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* GTlab - Gas Turbine laboratory
* Source File: gtpy_task.h
*
* SPDX-License-Identifier: Apache-2.0
* SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR)
*
* Created on: 12.08.2019
* Author: Marvin Noethen (DLR AT-TWK)
*/
#ifndef GTPY_TASK_H
#define GTPY_TASK_H
#include "gt_task.h"
#include "gtpy_abstractscriptcomponent.h"
/**
* @brief The GtpyTask class
*/
class GtpyTask : public GtTask, public GtpyAbstractScriptComponent
{
Q_OBJECT
public:
/**
* @brief GtpyTask
*/
Q_INVOKABLE GtpyTask();
/**
* @brief ~GtpyTask
*/
virtual ~GtpyTask();
/**
* @brief Adds all available packages to python context and starts
* the script evaluation.
* @return Whether evaluation was successful or not.
*/
virtual bool runIteration() override;
protected:
/**
* @brief Checks if parent of task is a process data instance. Is this true
* child will not be accepted.
* @return Whether child will be accepted or not.
*/
bool childAccepted(GtObject* /*child*/) override;
private:
/**
* @brief Returns the data package identified by the given object path.
* @param pkgPath Object path
* @return The data package identified by the given object path
*/
GtPackage* dataPackage(const GtObjectPath& pkgPath) override;
private slots:
void onStateChanged(GtProcessComponent::STATE state) const;
signals:
void deletedFromDatamodel(const QString& uuid);
};
#endif // GTPY_TASK_H