OSDN Git Service

Trivial cleanups for the command line parsing code. Adding and fixing doxygen comments.
[winmerge-jp/winmerge-jp.git] / Src / MergeCmdLineInfo.h
1 /////////////////////////////////////////////////////////////////////////////
2 //
3 //    WinMerge: An interactive diff/merge utility
4 //    Copyright (C) 1997 Dean P. Grimm
5 //
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.
10 //
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.
15 //
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.
19 //
20 /////////////////////////////////////////////////////////////////////////////
21
22 #ifndef _MERGE_CMD_LINE_INFO_INCLUDED_
23 #define _MERGE_CMD_LINE_INFO_INCLUDED_
24
25 /** 
26  * @file  MergeCmdLineInfo.h
27  *
28  * @brief MergeCmdLineInfo class declaration.
29  *
30  */
31
32 // ID line follows -- this is updated by SVN
33 // $Id$
34
35 class CmdLineParser;
36
37 /** 
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.
41  */
42 class MergeCmdLineInfo : public CCommandLineInfo
43 {
44 public:
45         MergeCmdLineInfo(const TCHAR *szExeName);
46         ~MergeCmdLineInfo();
47
48         virtual void ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast);
49
50 public:
51
52         int m_nCmdShow; /**< Initial state of the application's window. */
53
54         bool m_bClearCaseTool; /**< Running as Rational ClearCase external tool. */
55         bool m_bEscShutdown; /**< Pressing ESC will close the application */
56         bool m_bExitIfNoDiff; /**< Exit after telling the user that files are identical. */
57         bool m_bRecurse; /**< Include sub folder in directories compare. */
58         bool m_bNonInteractive; /**< Suppress user's notifications. */
59         bool m_bNoPrefs; /**< Do not load or remember preferences. */
60         bool m_bSingleInstance; /**< Allow only one instance of WinMerge executable. */
61         bool m_bShowUsage; /**< Show a brief reminder to command line arguments. */
62
63         DWORD m_dwLeftFlags; /**< Left side file's behavior options. */
64         DWORD m_dwRightFlags; /**< Right side file's behavior options. */
65
66         CString m_sLeftDesc; /**< Left side file's description. */
67         CString m_sRightDesc; /**< Right side file's description. */
68
69         CString m_sFileFilter; /**< File filter mask. */
70         CString m_sPreDiffer; /**< Pre-differ name. */
71
72         /** Command line arguments which are mapped to WinMerge's preferences. */
73         CMapStringToString m_Settings;
74
75         CStringArray m_Files; /**< Files (or directories) to compare. */
76
77         int m_nFiles; /**< Number of files (or directories) in m_Files. */
78
79 private:
80
81         /** Operator= is not implemented. */
82         MergeCmdLineInfo& operator=(const MergeCmdLineInfo& rhs);
83
84         CmdLineParser *m_pCmdLineParser; /**< The command line parser instance. */
85 };
86
87 #endif // _MERGE_CMD_LINE_INFO_INCLUDED_