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
30 #ifndef _MERGE_CMD_LINE_INFO_INCLUDED_
31 #define _MERGE_CMD_LINE_INFO_INCLUDED_
34 #include "UnicodeString.h"
37 * @brief WinMerge's command line handler.
38 * This class calls command line parser(s) and allows reading parsed values
39 * from public member variables.
41 class MergeCmdLineInfo
44 MergeCmdLineInfo(LPCTSTR);
48 int m_nCmdShow; /**< Initial state of the application's window. */
50 bool m_bClearCaseTool; /**< Running as Rational ClearCase external tool. */
51 bool m_bEscShutdown; /**< Pressing ESC will close the application */
52 bool m_bExitIfNoDiff; /**< Exit after telling the user that files are identical. */
53 bool m_bRecurse; /**< Include sub folder in directories compare. */
54 bool m_bNonInteractive; /**< Suppress user's notifications. */
55 bool m_bSingleInstance; /**< Allow only one instance of WinMerge executable. */
56 bool m_bShowUsage; /**< Show a brief reminder to command line arguments. */
57 int m_nCodepage; /**< Codepage. */
59 DWORD m_dwLeftFlags; /**< Left side file's behavior options. */
60 DWORD m_dwRightFlags; /**< Right side file's behavior options. */
62 String m_sLeftDesc; /**< Left side file's description. */
63 String m_sRightDesc; /**< Right side file's description. */
65 String m_sFileFilter; /**< File filter mask. */
66 String m_sPreDiffer; /**< Pre-differ name. */
68 std::vector<String> m_Files; /**< Files (or directories) to compare. */
72 static LPCTSTR EatParam(LPCTSTR, String &, bool *flag = 0);
73 static LPCTSTR SetOption(LPCTSTR, LPCTSTR key, LPCTSTR value = _T("1"));
74 void ParseClearCaseCmdLine(LPCTSTR);
75 void ParseWinMergeCmdLine(LPCTSTR);
76 void AddPath(const String &path);
78 /** Operator= is not implemented. */
79 MergeCmdLineInfo& operator=(const MergeCmdLineInfo& rhs);
82 #endif // _MERGE_CMD_LINE_INFO_INCLUDED_