Lhaz
読み取り中…
検索中…
一致する文字列を見つけられません
lhazlzh.h
[詳解]
1/*************************************************************************/
6#pragma once
7
8#include "altstr.hpp"
9#include "path.h"
10#include <windows.h>
11#include <vector>
12#include "mystr.h"
13#include "lhazarc.h"
14
15using std::vector;
16
17class LHAZPROCFILE;
18class MYFILE;
19class PATH;
20
21namespace gui {
22
23class LHAZTREEVIEW;
24
25} // namespace gui
26
27/*************************************************************************/
30class ADDFILE {
31public:
32 ADDFILE(const MYSTR& name, bool dir = false) :
33 m_name(name),
35 m_dir(dir)
36 {
37 }
38 ADDFILE(const ADDFILE &a) {
40 m_used = a.m_used;
41 m_dir = a.m_dir;
42 }
43 //
44 const MYSTR& GetName(void) const { return m_name; }
45 bool GetUsed(void) const { return m_used; }
46 void SetUsed(bool used) { m_used = used; }
47 bool IsDir(void) const { return m_dir; }
48
49private:
50 MYSTR m_name;
51 bool m_used;
52 bool m_dir;
53
54};
55
56/*************************************************************************/
59class ARCLZH : public ARCHIVE {
60public:
61 // 解凍・圧縮用コンストラクタ
62 ARCLZH(HWND hwnd, const WSTR& name, TYPE type);
63 // 閲覧用コンストラクタ
64 ARCLZH(HWND hwnd, const WSTR& name, TYPE type, const WSTR& filter, gui::LHAZTREEVIEW* treeview);
65 // デストラクタ
66 ‾ARCLZH(void);
67 // 全解凍
68 bool Extract(bool verify, const WSTR& temp, const WSTR& password);
69 // 個別解凍
70 bool Extract(const WSTR& temp);
71 // 圧縮
72 bool Compress(int method, int header, const WSTR& pass, const PATH& temp, const vector<LHAZPROCFILE>& v);
73 // 個別削除
74 bool Delete(const vector<LHAZFILE*>& v);
75 // 自己解凍書庫に変換
76 bool Convert(void);
77 // 自己解凍ルーチンをスキップ
78 bool SkipSfxCode(MYFILE& fp);
79 //
80 static bool IsArchiveLzh(unsigned int size, char* buf);
81 //
82 static const char HEADER[3];
83 static const char SFXHEADER[9];
84
85private:
86 static const unsigned char SfxCode[];
87 //
89 unsigned char Level;
90 int Method;
93 //
94 bool AddNew(const MYSTR& name, MYFILE& nafp);
95 bool AppendIt(vector<ADDFILE>& list, MYFILE& oafp, MYFILE& nafp);
96 void AppendList(const MYSTR& name, vector<ADDFILE> &list);
97 MYSTR BuildStandardArchiveName(const MYSTR& orginal);
98 void BuildTempName(void);
99 bool IsArchiveMsdosSfx1(const MYSTR& name);
100 bool IsNeedFile(const vector<LHAZFILE*>& v, const MYSTR& name);
101 bool PatMatch(const MYSTR& p, const MYSTR& s, int f);
102 void SendName(const MYSTR& name);
103 bool SkipMsdosSfx1Code(MYFILE& fp);
104
105};
¥ return false
Definition WinUnit.h:116
圧縮ファイル
Definition lhazlzh.h:30
const MYSTR & GetName(void) const
Definition lhazlzh.h:44
MYSTR m_name
Definition lhazlzh.h:50
bool m_dir
Definition lhazlzh.h:52
ADDFILE(const MYSTR &name, bool dir=false)
Definition lhazlzh.h:32
ADDFILE(const ADDFILE &a)
Definition lhazlzh.h:38
bool m_used
Definition lhazlzh.h:51
bool IsDir(void) const
Definition lhazlzh.h:47
void SetUsed(bool used)
Definition lhazlzh.h:46
bool GetUsed(void) const
Definition lhazlzh.h:45
Definition lhazarc.h:25
TYPE
Definition lhazarc.h:28
LZH書庫
Definition lhazlzh.h:59
bool AddNew(const MYSTR &name, MYFILE &nafp)
Definition lhazlzh.cpp:575
unsigned char Level
Definition lhazlzh.h:89
static const char SFXHEADER[9]
Definition lhazlzh.h:38
bool AppendIt(vector< ADDFILE > &list, MYFILE &oafp, MYFILE &nafp)
Definition lhazlzh.cpp:479
‾ARCLZH(void)
Definition lhazlzh.cpp:158
static const char HEADER[3]
Definition lhazlzh.h:37
bool SkipMsdosSfx1Code(MYFILE &fp)
Definition lhazlzh.cpp:409
bool Compress(int method, int header, const WSTR &pass, const PATH &temp, const vector< LHAZPROCFILE > &v)
Definition lhazlzh.cpp:226
static bool IsArchiveLzh(unsigned int size, char *buf)
Definition lhazlzh.cpp:696
bool IsArchiveMsdosSfx1(const MYSTR &name)
Definition lhazlzh.cpp:395
PATH TempName
Definition lhazlzh.h:92
static const unsigned char SfxCode[]
Definition lhazlzh.h:39
bool Convert(void)
Definition lhazlzh.cpp:719
MYSTR BuildStandardArchiveName(const MYSTR &orginal)
Definition lhazlzh.cpp:430
bool Extract(bool verify, const WSTR &temp, const WSTR &password)
Definition lhazlzh.cpp:165
int CompCnt
Definition lhazlzh.h:88
bool IsNeedFile(const vector< LHAZFILE * > &v, const MYSTR &name)
Definition lhazlzh.cpp:597
void BuildTempName(void)
Definition lhazlzh.cpp:383
int Method
Definition lhazlzh.h:90
void AppendList(const MYSTR &name, vector< ADDFILE > &list)
Definition lhazlzh.cpp:442
bool Delete(const vector< LHAZFILE * > &v)
Definition lhazlzh.cpp:324
void SendName(const MYSTR &name)
Definition lhazlzh.cpp:563
MYSTR NewArchiveName
Definition lhazlzh.h:91
bool SkipSfxCode(MYFILE &fp)
Definition lhazlzh.cpp:635
bool PatMatch(const MYSTR &p, const MYSTR &s, int f)
Definition lhazlzh.cpp:610
Definition lhazprocfile.h:11
Definition lhaztreeview.h:18
Archive
¥ type v
Definition lhazregs.h:21
Definition lhazbz2.h:17