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