Skip to content

Commit

Permalink
add function to read one lib file
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Dec 19, 2024
1 parent e8da375 commit b4a2a74
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/solver/modeler/loadFiles/readLibraries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@
*/

#include <antares/io/file.h>
#include <antares/solver/modelParser/parser.h>
#include <antares/solver/modelConverter/modelConverter.h>
#include <antares/solver/modelParser/parser.h>
#include "antares/solver/loadFiles/loadFiles.h"

namespace fs = std::filesystem;

namespace Antares::Solver::LoadFiles
{

Study::SystemModel::Library loadSingleLibrary(const fs::path& filePath)
static Study::SystemModel::Library loadSingleLibrary(const fs::path& filePath)
{
Study::SystemModel::Library lib;
return lib;
const std::string libraryStr = IO::readFile(filePath);

ModelParser::Parser parser;
ModelParser::Library libraryObj = parser.parse(libraryStr);
return ModelConverter::convert(libraryObj);
}

} // namespace Antares::Solver::LoadFiles

0 comments on commit b4a2a74

Please sign in to comment.