Add an option to the TortoiseGitMerge settings dialog to specify the number of contex...
[TortoiseGit.git] / src / TortoiseMerge / EditorConfigWrapper.h
blob337812675ba213f83c09b4e533339d56e174170c
1 // TortoiseGitMerge - a Diff/Patch program
3 // Copyright (C) 2014 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #pragma once
21 #include "FileTextLines.h"
23 class CEditorConfigWrapper
25 public:
26 bool Load(CString filename);
28 template <typename T> class Nullable
30 T m_Value;
31 bool m_bNull;
33 public:
34 Nullable()
35 : m_bNull(true)
39 Nullable(T value)
40 : m_bNull(false)
41 , m_Value(value)
45 operator T()
47 return m_Value;
50 void operator = (T value)
52 m_bNull = false;
53 m_Value = value;
56 void operator = (void *ptrnull)
58 if (ptrnull == nullptr)
59 m_bNull = true;
62 bool operator == (void* ptrnull)
64 return ptrnull == nullptr ? m_bNull : false;
67 bool operator != (void* ptrnull)
69 return ptrnull == nullptr ? !m_bNull : false;
73 Nullable<bool> m_bIndentStyle;
74 Nullable<int> m_nIndentSize;
75 Nullable<int> m_nTabWidth;
76 Nullable<EOL> m_EndOfLine;
77 Nullable<CFileTextLines::UnicodeType> m_Charset;
78 Nullable<bool> m_bTrimTrailingWhitespace;
79 Nullable<bool> m_bInsertFinalNewline;