1 /////////////////////////////////////////////////////////////////////////////
3 // WinMerge: An interactive diff/merge utility
4 // Copyright (C) 1997 Dean P. Grimm
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /////////////////////////////////////////////////////////////////////////////
22 * @file MergeCmdLineInfo.h
24 * @brief MergeCmdLineInfo class declaration.
27 // ID line follows -- this is updated by SVN
28 // $Id: MergeCmdLineInfo.h 6940 2009-08-01 17:29:01Z kimmov $
30 #ifndef _MERGE_CMD_LINE_INFO_INCLUDED_
31 #define _MERGE_CMD_LINE_INFO_INCLUDED_
34 #include "UnicodeString.h"
35 #include "PathContext.h"
38 * @brief WinMerge's command line handler.
39 * This class calls command line parser(s) and allows reading parsed values
40 * from public member variables.
42 class MergeCmdLineInfo
45 MergeCmdLineInfo(LPCTSTR);
51 Disabled, /**< Don't exit. */
52 Exit, /**< Exit and show message. */
53 ExitQuiet, /**< Exit and don't show message. */
56 int m_nCmdShow; /**< Initial state of the application's window. */
58 bool m_bClearCaseTool; /**< Running as Rational ClearCase external tool. */
59 bool m_bEscShutdown; /**< Pressing ESC will close the application */
60 ExitNoDiff m_bExitIfNoDiff; /**< Exit if files are identical. */
61 bool m_bRecurse; /**< Include sub folder in directories compare. */
62 bool m_bNonInteractive; /**< Suppress user's notifications. */
63 bool m_bSingleInstance; /**< Allow only one instance of WinMerge executable. */
64 bool m_bShowUsage; /**< Show a brief reminder to command line arguments. */
65 int m_nCodepage; /**< Codepage. */
67 DWORD m_dwLeftFlags; /**< Left side file's behavior options. */
68 DWORD m_dwMiddleFlags; /**< Middle side file's behavior options. */
69 DWORD m_dwRightFlags; /**< Right side file's behavior options. */
71 String m_sLeftDesc; /**< Left side file's description. */
72 String m_sMiddleDesc; /**< Middle side file's description. */
73 String m_sRightDesc; /**< Right side file's description. */
75 String m_sFileFilter; /**< File filter mask. */
76 String m_sPreDiffer; /**< Pre-differ name. */
80 PathContext m_Files; /**< Files (or directories) to compare. */
84 static LPCTSTR EatParam(LPCTSTR, String &, bool *flag = 0);
85 static LPCTSTR SetOption(LPCTSTR, LPCTSTR key, LPCTSTR value = _T("1"));
86 void ParseClearCaseCmdLine(LPCTSTR, LPCTSTR basedesc);
87 void ParseWinMergeCmdLine(LPCTSTR);
88 void AddPath(const String &path);
90 /** Operator= is not implemented. */
91 MergeCmdLineInfo& operator=(const MergeCmdLineInfo& rhs);
94 #endif // _MERGE_CMD_LINE_INFO_INCLUDED_