You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on issue #1244, I can see that some of the API for external variables could be improved:
bool addExternalVariable(const AnalyserExternalVariablePtr &externalVariable)
An AnalyserExternalVariablePtr is currently needed, which is needed when an external variable has some dependencies, but not if it doesn't have any. In the latter case, we should be able to add an external variable using just a VariablePtr.
bool removeExternalVariable(const ModelPtr &model, const std::string &componentName, const std::string &variableName)
Rather than passing a ModelPtr, a component name, and a variable name, we could simply pass a VariablePtr.
Replace with bool removeExternalVariable(const VariablePtr &variable)
bool containsExternalVariable(const ModelPtr &model, const std::string &componentName, const std::string &variableName)
Same as above.
Replace with bool containsExternalVariable(const VariablePtr &variable)
AnalyserExternalVariablePtr externalVariable(const ModelPtr &model, const std::string &componentName, const std::string &variableName)
Similar to above.
Replace with AnalyserExternalVariablePtr externalVariable(const VariablePtr &variable)
The text was updated successfully, but these errors were encountered:
While working on issue #1244, I can see that some of the API for external variables could be improved:
bool addExternalVariable(const AnalyserExternalVariablePtr &externalVariable)
An
AnalyserExternalVariablePtr
is currently needed, which is needed when an external variable has some dependencies, but not if it doesn't have any. In the latter case, we should be able to add an external variable using just aVariablePtr
.bool addExternalVariable(const VariablePtr &variable)
bool removeExternalVariable(const ModelPtr &model, const std::string &componentName, const std::string &variableName)
Rather than passing a
ModelPtr
, a component name, and a variable name, we could simply pass aVariablePtr
.bool removeExternalVariable(const VariablePtr &variable)
bool containsExternalVariable(const ModelPtr &model, const std::string &componentName, const std::string &variableName)
Same as above.
bool containsExternalVariable(const VariablePtr &variable)
AnalyserExternalVariablePtr externalVariable(const ModelPtr &model, const std::string &componentName, const std::string &variableName)
Similar to above.
AnalyserExternalVariablePtr externalVariable(const VariablePtr &variable)
The text was updated successfully, but these errors were encountered: