Fix typo in doc
[TortoiseGit.git] / src / TortoiseMerge / EditorConfigWrapper.h
blob3c392dfd8bcc6229b27712668ced4ab52828366b
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)
36 , m_Value()
40 Nullable(T value)
41 : m_bNull(false)
42 , m_Value(value)
46 operator T()
48 return m_Value;
51 void operator = (T value)
53 m_bNull = false;
54 m_Value = value;
57 void operator = (void *ptrnull)
59 if (ptrnull == nullptr)
60 m_bNull = true;
63 bool operator == (void* ptrnull)
65 return ptrnull == nullptr ? m_bNull : false;
68 bool operator != (void* ptrnull)
70 return ptrnull == nullptr ? !m_bNull : false;
74 Nullable<bool> m_bIndentStyle;
75 Nullable<int> m_nIndentSize;
76 Nullable<int> m_nTabWidth;
77 Nullable<EOL> m_EndOfLine;
78 Nullable<CFileTextLines::UnicodeType> m_Charset;
79 Nullable<bool> m_bTrimTrailingWhitespace;
80 Nullable<bool> m_bInsertFinalNewline;