Skip to content

Commit

Permalink
#3284 Adapt DynamicData API.
Browse files Browse the repository at this point in the history
Signed-off-by: Gautier Bureau <gautier.bureau@gmail.com>
  • Loading branch information
gautierbureau committed Jun 19, 2024
1 parent f3a4524 commit c9dc9cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dynawo/sources/Modeler/Common/DYNDynamicData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ void
DynamicData::initFromDydFiles(const std::vector <string>& fileNames) {
dynamicdata::XmlImporter importer;

dynamicModelsCollection_ = importer.importFromDydFiles(fileNames);
setDynamicModelsCollection(importer.importFromDydFiles(fileNames));
}

void
DynamicData::setDynamicModelsCollection(const boost::shared_ptr<dynamicdata::DynamicModelsCollection>& dynamicModelsCollection) {
dynamicModelsCollection_ = dynamicModelsCollection;

createModelDescriptions();

Expand Down
6 changes: 6 additions & 0 deletions dynawo/sources/Modeler/Common/DYNDynamicData.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ class DynamicData : public boost::noncopyable {
*/
void initFromDydFiles(const std::vector <std::string>& fileNames);

/**
* @brief set of dynamic models collection
* @param dynamicModelsCollection the dynamic data model
*/
void setDynamicModelsCollection(const boost::shared_ptr<dynamicdata::DynamicModelsCollection>& dynamicModelsCollection);

/**
* @brief get network parameters from a directory
* @param parFile parameter file
Expand Down

0 comments on commit c9dc9cd

Please sign in to comment.