@@ -30,6 +30,20 public: | |||
|
30 | 30 | |
|
31 | 31 | void setTimeController(TimeController *timeController) noexcept; |
|
32 | 32 | |
|
33 | /** | |
|
34 | * Deletes from the controller the variable passed in parameter. | |
|
35 | * | |
|
36 | * | |
|
37 | * @param variable the variable to delete from the controller. | |
|
38 | */ | |
|
39 | void deleteVariable(std::shared_ptr<Variable> variable) noexcept; | |
|
40 | ||
|
41 | /** | |
|
42 | * Deletes from the controller the variables passed in parameter. | |
|
43 | * @param variables the variables to delete from the controller. | |
|
44 | * @sa deleteVariable() | |
|
45 | */ | |
|
46 | void deleteVariables(const QVector<std::shared_ptr<Variable> > &variables) noexcept; | |
|
33 | 47 | |
|
34 | 48 | signals: |
|
35 | 49 | /// Signal emitted when a variable has been created |
@@ -82,6 +82,24 void VariableController::setTimeController(TimeController *timeController) noexc | |||
|
82 | 82 | impl->m_TimeController = timeController; |
|
83 | 83 | } |
|
84 | 84 | |
|
85 | void VariableController::deleteVariable(std::shared_ptr<Variable> variable) noexcept | |
|
86 | { | |
|
87 | if (!variable) { | |
|
88 | qCCritical(LOG_VariableController()) << "Can't delete variable: variable is null"; | |
|
89 | return; | |
|
90 | } | |
|
91 | ||
|
92 | /// @todo ALX | |
|
93 | ||
|
94 | ||
|
95 | void VariableController::deleteVariables( | |
|
96 | const QVector<std::shared_ptr<Variable> > &variables) noexcept | |
|
97 | { | |
|
98 | for (auto variable : qAsConst(variables)) { | |
|
99 | deleteVariable(variable); | |
|
100 | } | |
|
101 | } | |
|
102 | ||
|
85 | 103 | void VariableController::createVariable(const QString &name, |
|
86 | 104 | std::shared_ptr<IDataProvider> provider) noexcept |
|
87 | 105 | { |
General Comments 0
You need to be logged in to leave comments.
Login now