OSDN Git Service

Fix untranslated strings
[winmerge-jp/winmerge-jp.git] / Src / ConfigLog.h
1 /////////////////////////////////////////////////////////////////////////////
2 //    License (GPLv2+):
3 //    This program is free software; you can redistribute it and/or modify
4 //    it under the terms of the GNU General Public License as published by
5 //    the Free Software Foundation; either version 2 of the License, or
6 //    (at your option) any later version.
7 //
8 //    This program is distributed in the hope that it will be useful, but
9 //    WITHOUT ANY WARRANTY; without even the implied warranty of
10 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //    General Public License for more details.
12 //
13 //    You should have received a copy of the GNU General Public License
14 //    along with this program; if not, write to the Free Software
15 //    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 /////////////////////////////////////////////////////////////////////////////
17 /** 
18  * @file  ConfigLog.h
19  *
20  * @brief Declaration file ConfigLog class
21  */
22 #pragma once
23
24
25 #include "UnicodeString.h"
26 #include <memory>
27
28 class UniStdioFile;
29
30 /** 
31  * @brief Class for saving configuration log file
32  */
33 class CConfigLog
34 {
35 public:
36         CConfigLog();
37         ~CConfigLog();
38
39         String GetFileName() const;
40         bool WriteLogFile(String &sError);
41
42         // Implementation methods
43 protected:
44         void WriteItem(int indent, const String& key, const TCHAR *value = 0);
45         void WriteItem(int indent, const String& key, const String &str);
46         void WriteItem(int indent, const String& key, long value);
47         void WriteVersionOf1(int indent, const String& path);
48         void WriteLocaleSettings(unsigned locid, const String& title);
49         void WriteWinMergeConfig(void);
50
51 private:
52         bool DoFile(String &sError);
53         void WritePluginsInLogFile(const wchar_t *transformationEvent);
54         String GetWindowsVer() const;
55         String GetBuildFlags() const;
56         void FileWriteString(const String& lpsz);
57         void CloseFile();
58
59         // Implementation data
60 private:
61         String m_sFileName;
62         std::unique_ptr<UniStdioFile> m_pfile;
63 };