OSDN Git Service

compiler-calculated maximum value for `m_SourceDefs` (#966)
[winmerge-jp/winmerge-jp.git] / Src / DiffFileData.h
1 /** 
2  * @file DiffFileData.h
3  *
4  * @brief Declaration for DiffFileData class.
5  *
6  * @date  Created: 2003-08-22
7  */
8 #pragma once
9
10 #include "FileLocation.h"
11 #include "FileTextStats.h"
12
13 // forward declarations needed by DiffFileData
14 struct file_data;
15 class PrediffingInfo;
16 class CDiffContext;
17
18 /**
19  * @brief C++ container for the structure (file_data) used by diffutils' diff_2_files(...)
20  */
21 struct DiffFileData
22 {
23 // class interface
24
25 // instance interface
26
27         DiffFileData();
28         DiffFileData(const DiffFileData& other) = delete;
29         ~DiffFileData();
30
31         bool OpenFiles(const String& szFilepath1, const String& szFilepath2);
32         void Reset();
33         void Close() { Reset(); }
34         void SetDisplayFilepaths(const String& szTrueFilepath1, const String& szTrueFilepath2);
35
36         bool Filepath_Transform(bool bForceUTF8, const FileTextEncoding & encoding, const String & filepath, String & filepathTransformed,
37                 const String& filteredFilenames, PrediffingInfo& infoPrediffer);
38
39 // Data (public)
40         file_data * m_inf;
41         bool m_used; // whether m_inf has real data
42         FileLocation m_FileLocation[3];
43         FileTextStats m_textStats[3];
44
45         String m_sDisplayFilepath[2];
46
47 private:
48         bool DoOpenFiles();
49 };