forked from WinMerge/winmerge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiffFileInfo.h
46 lines (40 loc) · 1.12 KB
/
DiffFileInfo.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
// SPDX-License-Identifier: GPL-2.0-or-later
/**
* @file DiffFileInfo.h
*
* @brief Declaration file for DiffFileInfo
*/
#pragma once
#include "DirItem.h"
#include "FileVersion.h"
#include "FileTextEncoding.h"
#include "FileTextStats.h"
#include "PropertySystem.h"
/**
* @brief Information for file.
* This class expands DirItem class with encoding information and
* text stats information.
* @sa DirItem.
*/
struct DiffFileInfo : public DirItem
{
// data
FileVersion version; /**< string of fixed file version, eg, 1.2.3.4 */
FileTextEncoding encoding; /**< unicode or codepage info */
FileTextStats m_textStats; /**< EOL, zero-byte etc counts */
std::unique_ptr<PropertyValues> m_pAdditionalProperties; /**< Additional Property values */
// We could stash a pointer here to the parent DIFFITEM
// but, I ran into trouble with, I think, the DIFFITEM copy constructor
// methods
DiffFileInfo() = default;
//void Clear();
void ClearPartial();
bool IsEditableEncoding() const;
};
/**
* @brief Return true if file is in any Unicode encoding
*/
inline bool DiffFileInfo::IsEditableEncoding() const
{
return !encoding.m_bom;
}