-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #492 from AntaresSimulatorTeam/feature/zip_mps
Feature/zip mps
- Loading branch information
Showing
82 changed files
with
1,274 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,4 @@ if (NOT antares-solver_FOUND) | |
endif() | ||
|
||
endif() | ||
|
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DATA in file 1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
File 3 content | ||
1 | ||
2 | ||
4 | ||
2 | ||
2 | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#ifndef _ARCHIVEIO_H | ||
#define _ARCHIVEIO_H | ||
|
||
extern "C" { | ||
#include <mz.h> | ||
#include <mz_strm.h> | ||
#include <mz_zip.h> | ||
#include <mz_zip_rw.h> | ||
} | ||
#include <stdexcept> | ||
#include <string> | ||
|
||
class ArchiveIOGeneralException : public std::runtime_error { | ||
public: | ||
ArchiveIOGeneralException(int32_t status, const std::string& action, | ||
int32_t expectedStatus = MZ_OK) | ||
: std::runtime_error("Failed to " + action + | ||
" invalid status: " + std::to_string(status) + " (" + | ||
std::to_string(expectedStatus) + " expected)") {} | ||
}; | ||
class ArchiveIOSpecificException : public std::runtime_error { | ||
public: | ||
ArchiveIOSpecificException(int32_t status, const std::string& errMessage, | ||
int32_t expectedStatus = MZ_OK) | ||
: std::runtime_error( | ||
errMessage + "\ninvalid status: " + std::to_string(status) + " (" + | ||
std::to_string(expectedStatus) + " expected)") {} | ||
}; | ||
#include <filesystem> | ||
#include <shared_mutex> | ||
class ArchiveIO { | ||
private: | ||
std::filesystem::path archivePath_; | ||
|
||
protected: | ||
mutable std::shared_mutex mutex_; | ||
|
||
virtual void Create() = 0; | ||
|
||
public: | ||
explicit ArchiveIO(const std::filesystem::path& archivePath) | ||
: archivePath_(archivePath) {} | ||
ArchiveIO() = default; | ||
std::filesystem::path ArchivePath() const { return archivePath_; } | ||
void SetArchivePath(const std::filesystem::path& archivePath) { | ||
archivePath_ = archivePath; | ||
}; | ||
|
||
virtual int32_t Close() = 0; | ||
virtual void Delete() = 0; | ||
|
||
virtual int Open() = 0; | ||
}; | ||
|
||
#endif // _ARCHIVEIO_H |
Oops, something went wrong.