OSDN Git Service

Plugins: Fix a crash on Window XP
[winmerge-jp/winmerge-jp.git] / Src / MergeCmdLineInfo.h
index 6c563fe..7d54398 100644 (file)
@@ -1,22 +1,7 @@
 /////////////////////////////////////////////////////////////////////////////
-//
 //    WinMerge: An interactive diff/merge utility
 //    Copyright (C) 1997 Dean P. Grimm
-//
-//    This program is free software; you can redistribute it and/or modify
-//    it under the terms of the GNU General Public License as published by
-//    the Free Software Foundation; either version 2 of the License, or
-//    (at your option) any later version.
-//
-//    This program is distributed in the hope that it will be useful,
-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//    GNU General Public License for more details.
-//
-//    You should have received a copy of the GNU General Public License
-//    along with this program; if not, write to the Free Software
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
+//    SPDX-License-Identifier: GPL-2.0-or-later
 /////////////////////////////////////////////////////////////////////////////
 /** 
  * @file  MergeCmdLineInfo.h
  * @brief MergeCmdLineInfo class declaration.
  *
  */
-// ID line follows -- this is updated by SVN
-// $Id: MergeCmdLineInfo.h 6940 2009-08-01 17:29:01Z kimmov $
-
-#ifndef _MERGE_CMD_LINE_INFO_INCLUDED_
-#define _MERGE_CMD_LINE_INFO_INCLUDED_
+#pragma once
 
 #include "UnicodeString.h"
 #include "PathContext.h"
+#include <map>
+#include <optional>
 
 /** 
  * @brief WinMerge's command line handler.
@@ -59,16 +42,28 @@ public:
                MINIMIZE = 6,
        };
 
+       enum CompareMethodType
+       {
+               CONTENT,
+               QUICK_CONTENT,
+               BINARY_CONTENT,
+               DATE,
+               DATE_SIZE,
+               SIZE,
+       };
+
        ShowWindowType m_nCmdShow; /**< Initial state of the application's window. */
 
-       bool m_bClearCaseTool; /**< Running as Rational ClearCase external tool. */
        bool m_bEscShutdown; /**< Pressing ESC will close the application */
        ExitNoDiff m_bExitIfNoDiff; /**< Exit if files are identical. */
        bool m_bRecurse; /**< Include sub folder in directories compare. */
+       std::optional<CompareMethodType> m_nCompMethod; /**< Compare method */
        bool m_bNonInteractive; /**< Suppress user's notifications. */
-       bool m_bSingleInstance; /**< Allow only one instance of WinMerge executable. */
+       std::optional<int> m_nSingleInstance; /**< Allow only one instance of WinMerge executable. */
        bool m_bShowUsage; /**< Show a brief reminder to command line arguments. */
        int  m_nCodepage;  /**< Codepage. */
+       bool m_bNoPrefs; /**< Do not load or remember options (preferences) */   
+       bool m_bSelfCompare; /**< Compares the specified file with a copy of the file */
 
        unsigned m_dwLeftFlags; /**< Left side file's behavior options. */
        unsigned m_dwMiddleFlags; /**< Middle side file's behavior options. */
@@ -80,16 +75,22 @@ public:
 
        String m_sFileFilter; /**< File filter mask. */
        String m_sPreDiffer; /**< Pre-differ name. */
+       String m_sUnpacker; /**< Unpacker name. */
 
        String m_sOutputpath;
+       String m_sReportFile;
 
        PathContext m_Files; /**< Files (or directories) to compare. */
 
+       std::map<String, String> m_Options;
+
+       std::vector<String> m_sErrorMessages;
+
 private:
 
-       static const TCHAR *EatParam(const TCHAR *, String &, bool *flag = 0);
-       static const TCHAR *SetOption(const TCHAR *, const String& key, const TCHAR *value = _T("1"));
-       void ParseClearCaseCmdLine(const TCHAR *, const TCHAR *basedesc);
+       static const TCHAR *EatParam(const TCHAR *, String &, bool *flag = nullptr);
+       const TCHAR *SetOption(const TCHAR *, const String& key, const TCHAR *value = _T("1"));
+       const TCHAR *SetConfig(const TCHAR *);
        void ParseWinMergeCmdLine(const TCHAR *);
        void AddPath(const String &path);
 
@@ -97,4 +98,3 @@ private:
        MergeCmdLineInfo& operator=(const MergeCmdLineInfo& rhs);
 };
 
-#endif // _MERGE_CMD_LINE_INFO_INCLUDED_