##// END OF EJS Templates
Variable deletion (1)...
Alexandre Leroux -
r303:41160549d9f7
parent child
Show More
@@ -30,6 +30,20 public:
30
30
31 void setTimeController(TimeController *timeController) noexcept;
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 signals:
48 signals:
35 /// Signal emitted when a variable has been created
49 /// Signal emitted when a variable has been created
@@ -82,6 +82,24 void VariableController::setTimeController(TimeController *timeController) noexc
82 impl->m_TimeController = timeController;
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 void VariableController::createVariable(const QString &name,
103 void VariableController::createVariable(const QString &name,
86 std::shared_ptr<IDataProvider> provider) noexcept
104 std::shared_ptr<IDataProvider> provider) noexcept
87 {
105 {
General Comments 0
You need to be logged in to leave comments. Login now