37 lines
836 B
C++
37 lines
836 B
C++
#pragma once
|
|
#include "common.hpp"
|
|
|
|
class ZIPModel
|
|
{
|
|
public:
|
|
void compress(string srcFilePath, string dstFilePath);
|
|
void decompress(string srcFilePath, string dstFilePath);
|
|
};
|
|
|
|
class RARModel
|
|
{
|
|
public:
|
|
void compress(string srcFilePath, string dstFilePath);
|
|
void decompress(string srcFilePath, string dstFilePath);
|
|
};
|
|
|
|
class ZModel
|
|
{
|
|
public:
|
|
void compress(string srcFilePath, string dstFilePath);
|
|
void decompress(string srcFilePath, string dstFilePath);
|
|
};
|
|
|
|
class CompressionFacade
|
|
{
|
|
public:
|
|
CompressionFacade(ZIPModel* pZipModel = nullptr, RARModel* pRarModel = nullptr, ZModel* pZModel = nullptr);
|
|
~CompressionFacade();
|
|
void compress(string srcFilePath, string dstFilePath, string type);
|
|
void decompress(string srcFilePath, string dstFilePath);
|
|
|
|
private:
|
|
ZIPModel* m_pZipModel;
|
|
RARModel* m_pRarModel;
|
|
ZModel* m_pZModel;
|
|
}; |