Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Oct 15, 2024
1 parent 40dd4b0 commit 7acbb35
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/libs/antares/writer/include/antares/writer/i_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class IResultWriter
public:
using Ptr = std::shared_ptr<IResultWriter>;
virtual void addEntryFromBuffer(const std::string& entryPath, Yuni::Clob& entryContent) = 0;
virtual void addEntryFromBuffer(const std::filesystem::path& entryPath, std::string& entryContent) = 0;
virtual void addEntryFromBuffer(const std::filesystem::path& entryPath,
std::string& entryContent)
= 0;
virtual void addEntryFromFile(const std::filesystem::path& entryPath,
const std::filesystem::path& filePath)
= 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class InMemoryWriter: public IResultWriter
explicit InMemoryWriter(Benchmarking::DurationCollector& duration_collector);
virtual ~InMemoryWriter();
void addEntryFromBuffer(const std::string& entryPath, Yuni::Clob& entryContent) override;
void addEntryFromBuffer(const std::filesystem::path& entryPath, std::string& entryContent) override;
void addEntryFromBuffer(const std::filesystem::path& entryPath,
std::string& entryContent) override;
void addEntryFromFile(const std::filesystem::path& entryPath,
const std::filesystem::path& filePath) override;
void flush() override;
Expand Down
3 changes: 2 additions & 1 deletion src/libs/antares/writer/private/immediate_file_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class ImmediateFileResultWriter: public IResultWriter
virtual ~ImmediateFileResultWriter();
// Write to file immediately, creating directories if needed
void addEntryFromBuffer(const std::string& entryPath, Yuni::Clob& entryContent) override;
void addEntryFromBuffer(const std::filesystem::path& entryPath, std::string& entryContent) override;
void addEntryFromBuffer(const std::filesystem::path& entryPath,
std::string& entryContent) override;
void addEntryFromFile(const std::filesystem::path& entryPath,
const std::filesystem::path& filePath) override;
void flush() override;
Expand Down
6 changes: 4 additions & 2 deletions src/libs/antares/writer/private/zip_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class ZipWriter: public IResultWriter
Benchmarking::DurationCollector& duration_collector);
virtual ~ZipWriter();
void addEntryFromBuffer(const std::string& entryPath, Yuni::Clob& entryContent) override;
void addEntryFromBuffer(const std::filesystem::path& entryPath, std::string& entryContent) override;
void addEntryFromBuffer(const std::filesystem::path& entryPath,
std::string& entryContent) override;
void addEntryFromFile(const std::filesystem::path& entryPath,
const std::filesystem::path& filePath) override;
void flush() override;
Expand All @@ -109,7 +110,8 @@ class ZipWriter: public IResultWriter

private:
template<class ContentType>
void addEntryFromBufferHelper(const std::filesystem::path& entryPath, ContentType& entryContent);
void addEntryFromBufferHelper(const std::filesystem::path& entryPath,
ContentType& entryContent);
};
} // namespace Antares::Solver

Expand Down
3 changes: 2 additions & 1 deletion src/libs/antares/writer/private/zip_writer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
namespace Antares::Solver
{
template<class ContentType>
void ZipWriter::addEntryFromBufferHelper(const std::filesystem::path& entryPath, ContentType& entryContent)
void ZipWriter::addEntryFromBufferHelper(const std::filesystem::path& entryPath,
ContentType& entryContent)
{
if (pState != ZipState::can_receive_data)
{
Expand Down

0 comments on commit 7acbb35

Please sign in to comment.