Produced by Araxis Merge on Sat Apr 12 16:07:31 2003. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Internet Explorer. For optimum results when printing this report, enable printing of background images and colours in your browser and use landscape orientation.
# | File | Location | Last Modified |
---|---|---|---|
1 | compareutil.h | c:\scm\dev\Software\Products\merge\6.0\Merge\compare | Mon Mar 17 01:01:18 2003 UTC |
2 | compareutil.h | c:\scm\dev\Software\Products\merge\6.5\Merge\compare | Tue Apr 8 00:52:34 2003 UTC |
Description | Between Files 1 and 2 | |
---|---|---|
Blocks | Lines | |
Unchanged | 18 | 488 |
Changed | 17 | 48 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | All differences in whitespace within lines are ignored |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Hidden in comparison detail |
No regular expressions were active.
1 | #pragma once | 1 | #pragma once | |||
2 | 2 | |||||
3 | namespace compareutil | 3 | namespace compareutil | |||
4 | { | 4 | { | |||
5 | #define MERGE_VERSION _T("6.5") | 5 | #define MERGE_VERSION _T("6.5") | |||
6 | 6 | |||||
7 | // Some useful typedefs. | 7 | // Some useful typedefs. | |||
8 | // | 8 | // | |||
9 | 9 | |||||
10 | #if defined(UNICODE) || defined(_UNICODE) | 10 | #if defined(UNICODE) || defined(_UNICODE) | |||
(13 unchanged lines omitted) | ||||||
24 | // | 24 | // | |||
25 | 25 | |||||
26 | enum ReturnCode { | 26 | enum ReturnCode { | |||
27 | rcSucceeded, | 27 | rcSucceeded, | |||
28 | rcFailed | 28 | rcFailed | |||
29 | }; | 29 | }; | |||
30 | 30 | |||||
31 | // A handle to the active file comparison. | 31 | // A handle to the active file comparison. | |||
32 | // | 32 | // | |||
33 | 33 | |||||
34 | extern Merge ::IFileComparison2Ptr g_pFile; | 34 | extern Merge65::IFileComparison Ptr g_pFile; | |||
35 | extern Merge ::IFolderComparisonPtr g_pFolder; | 35 | extern Merge65::IFolderComparisonPtr g_pFolder; | |||
36 | 36 | |||||
37 | // Function information. | 37 | // Function information. | |||
38 | // | 38 | // | |||
39 | 39 | |||||
40 | extern _ATL_FUNC_INFO folder_fninfo[]; | 40 | extern _ATL_FUNC_INFO folder_fninfo[]; | |||
41 | extern _ATL_FUNC_INFO file_fninfo[]; | 41 | extern _ATL_FUNC_INFO file_fninfo[]; | |||
42 | 42 | |||||
43 | // This class is used to sink events fired by the Merge Folder Comparison window. | 43 | // This class is used to sink events fired by the Merge Folder Comparison window. | |||
44 | // | 44 | // | |||
45 | 45 | |||||
46 | class ATL_NO_VTABLE CFolderComparisonWaitObject : | 46 | class ATL_NO_VTABLE CFolderComparisonWaitObject : | |||
47 | public CComObjectRootEx<CComSingleThreadModel>, | 47 | public CComObjectRootEx<CComSingleThreadModel>, | |||
48 | public CComCoClass<CFolderComparisonWaitObject>, | 48 | public CComCoClass<CFolderComparisonWaitObject>, | |||
49 | public IDispatchImpl<IDispatch, &IID_IDispatch, 0>, | 49 | public IDispatchImpl<IDispatch, &IID_IDispatch, 0>, | |||
50 | public IDispEventImpl<0, CFolderComparisonWaitObject, &__uuidof(Merge ::_FolderComparisonEvents)> | 50 | public IDispEventImpl<0, CFolderComparisonWaitObject, &__uuidof(Merge65::_FolderComparisonEvents)> | |||
51 | { | 51 | { | |||
52 | public: | 52 | public: | |||
53 | BEGIN_COM_MAP(CFolderComparisonWaitObject) | 53 | BEGIN_COM_MAP(CFolderComparisonWaitObject) | |||
54 | COM_INTERFACE_ENTRY(IDispatch) | 54 | COM_INTERFACE_ENTRY(IDispatch) | |||
55 | END_COM_MAP() | 55 | END_COM_MAP() | |||
56 | 56 | |||||
57 | public: | 57 | public: | |||
58 | BEGIN_SINK_MAP(CFolderComparisonWaitObject) | 58 | BEGIN_SINK_MAP(CFolderComparisonWaitObject) | |||
59 | SINK_ENTRY_INFO(0, __uuidof(Merge ::_FolderComparisonEvents), 1, ComparisonComplete, &folder_fninfo[0]) | 59 | SINK_ENTRY_INFO(0, __uuidof(Merge65::_FolderComparisonEvents), 1, ComparisonComplete, &folder_fninfo[0]) | |||
60 | SINK_ENTRY_INFO(0, __uuidof(Merge ::_FolderComparisonEvents), 2, Close, &folder_fninfo[1]) | 60 | SINK_ENTRY_INFO(0, __uuidof(Merge65::_FolderComparisonEvents), 2, Close, &folder_fninfo[1]) | |||
61 | END_SINK_MAP() | 61 | END_SINK_MAP() | |||
62 | 62 | |||||
63 | // Merge::_FolderComparisonEvents | 63 | // Merge::_FolderComparisonEvents | |||
64 | void __stdcall ComparisonComplete( | 64 | void __stdcall ComparisonComplete( | |||
65 | Merge ::FolderComparisonResult nResult) | 65 | Merge65::FolderComparisonResult nResult) | |||
66 | { | 66 | { | |||
67 | UNREFERENCED_PARAMETER(nResult); | 67 | UNREFERENCED_PARAMETER(nResult); | |||
68 | } | 68 | } | |||
69 | 69 | |||||
70 | void __stdcall Close() | 70 | void __stdcall Close() | |||
71 | { | 71 | { | |||
72 | DispEventUnadvise(g_pFolder, &__uuidof(Merge ::_FolderComparisonEvents)); | 72 | DispEventUnadvise(g_pFolder, &__uuidof(Merge65::_FolderComparisonEvents)); | |||
73 | 73 | |||||
74 | // Quit this program. | 74 | // Quit this program. | |||
75 | PostQuitMessage(0); | 75 | PostQuitMessage(0); | |||
76 | } | 76 | } | |||
77 | }; | 77 | }; | |||
78 | 78 | |||||
79 | // This class is used to sink events fired by the Merge File Comparison window. | 79 | // This class is used to sink events fired by the Merge File Comparison window. | |||
80 | // | 80 | // | |||
81 | 81 | |||||
82 | class ATL_NO_VTABLE CFileComparisonWaitObject : | 82 | class ATL_NO_VTABLE CFileComparisonWaitObject : | |||
83 | public CComObjectRootEx<CComSingleThreadModel>, | 83 | public CComObjectRootEx<CComSingleThreadModel>, | |||
84 | public CComCoClass<CFileComparisonWaitObject>, | 84 | public CComCoClass<CFileComparisonWaitObject>, | |||
85 | public IDispatchImpl<IDispatch, &IID_IDispatch, 0>, | 85 | public IDispatchImpl<IDispatch, &IID_IDispatch, 0>, | |||
86 | public IDispEventImpl<0, CFileComparisonWaitObject, &__uuidof(Merge ::_FileComparisonEvents)> | 86 | public IDispEventImpl<0, CFileComparisonWaitObject, &__uuidof(Merge65::_FileComparisonEvents)> | |||
87 | { | 87 | { | |||
88 | public: | 88 | public: | |||
89 | BEGIN_COM_MAP(CFileComparisonWaitObject) | 89 | BEGIN_COM_MAP(CFileComparisonWaitObject) | |||
90 | COM_INTERFACE_ENTRY(IDispatch) | 90 | COM_INTERFACE_ENTRY(IDispatch) | |||
91 | END_COM_MAP() | 91 | END_COM_MAP() | |||
92 | 92 | |||||
93 | public: | 93 | public: | |||
94 | BEGIN_SINK_MAP(CFileComparisonWaitObject) | 94 | BEGIN_SINK_MAP(CFileComparisonWaitObject) | |||
95 | SINK_ENTRY_INFO(0, __uuidof(Merge ::_FileComparisonEvents), 1, ComparisonComplete, &file_fninfo[0]) | 95 | SINK_ENTRY_INFO(0, __uuidof(Merge65::_FileComparisonEvents), 1, ComparisonComplete, &file_fninfo[0]) | |||
96 | SINK_ENTRY_INFO(0, __uuidof(Merge ::_FileComparisonEvents), 2, Close, &file_fninfo[1]) | 96 | SINK_ENTRY_INFO(0, __uuidof(Merge65::_FileComparisonEvents), 2, Close, &file_fninfo[1]) | |||
97 | END_SINK_MAP() | 97 | END_SINK_MAP() | |||
98 | 98 | |||||
99 | // Merge::_FileComparisonEvents | 99 | // Merge::_FileComparisonEvents | |||
100 | void __stdcall ComparisonComplete( | 100 | void __stdcall ComparisonComplete( | |||
101 | Merge ::FileComparisonError /*error1*/, | 101 | Merge65::FileComparisonError /*error */, | |||
102 | Merge::FileComparisonResult /*result1*/, | 102 | Merge65::FileComparisonResult /*result */) | |||
103 | Merge::FileComparisonError /*error2*/, | |||||
104 | Merge ::FileComparisonResult /*result2*/) | |||||
105 | { | 103 | { | |||
106 | } | 104 | } | |||
107 | 105 | |||||
108 | void __stdcall Close() | 106 | void __stdcall Close() | |||
109 | { | 107 | { | |||
110 | DispEventUnadvise(g_pFile, &__uuidof(Merge ::_FileComparisonEvents)); | 108 | DispEventUnadvise(g_pFile, &__uuidof(Merge65::_FileComparisonEvents)); | |||
111 | 109 | |||||
112 | // Quit this program. | 110 | // Quit this program. | |||
113 | PostQuitMessage(0); | 111 | PostQuitMessage(0); | |||
114 | } | 112 | } | |||
115 | }; | 113 | }; | |||
116 | 114 | |||||
117 | // Output an informational message | 115 | // Output an informational message | |||
118 | extern void | 116 | extern void | |||
119 | DisplayInfo( | 117 | DisplayInfo( | |||
120 | LPCTSTR pszText); | 118 | LPCTSTR pszText); | |||
(90 unchanged lines omitted) | ||||||
211 | 209 | |||||
212 | // Report a serious error. | 210 | // Report a serious error. | |||
213 | // | 211 | // | |||
214 | 212 | |||||
215 | extern void | 213 | extern void | |||
216 | ReportError(LPCTSTR lpszWhileTrying); | 214 | ReportError(LPCTSTR lpszWhileTrying); | |||
217 | 215 | |||||
218 | // Create a new folder comparison automation object. | 216 | // Create a new folder comparison automation object. | |||
219 | // | 217 | // | |||
220 | 218 | |||||
221 | extern void getAutomationObject(Merge ::IApplicationPtr pApp, Merge ::IFolderComparisonPtr& automationObject); | 219 | extern void getAutomationObject(Merge65::IApplicationPtr pApp, Merge65::IFolderComparisonPtr& automationObject); | |||
222 | 220 | |||||
223 | // Create a new file comparison automation object. | 221 | // Create a new file comparison automation object. | |||
224 | // | 222 | // | |||
225 | 223 | |||||
226 | extern void getAutomationObject(Merge ::IApplicationPtr pApp, Merge ::IFileComparison2Ptr& automationObject); | 224 | extern void getAutomationObject(Merge65::IApplicationPtr pApp, Merge65::IFileComparison Ptr& automationObject); | |||
227 | 225 | |||||
228 | // Do a three-way merge on a file comparison, and return the number of conflicts (or 0 if there weren't any). | 226 | // Do a three-way merge on a file comparison, and return the number of conflicts (or 0 if there weren't any). | |||
229 | // (Note: This is a no-op for folder comparisons) | 227 | // (Note: This is a no-op for folder comparisons) | |||
230 | 228 | |||||
231 | extern long threeWayMerge(Merge ::IFolderComparisonPtr automationObject); | 229 | extern long threeWayMerge(Merge65::IFolderComparisonPtr automationObject); | |||
232 | extern long threeWayMerge(Merge ::IFileComparison2Ptr automationObject); | 230 | extern long threeWayMerge(Merge65::IFileComparison Ptr automationObject); | |||
233 | 231 | |||||
234 | // This happens automatically in the Compare method. | 232 | // This happens automatically in the Compare method. | |||
235 | // | 233 | // | |||
236 | 234 | |||||
237 | extern void setThreeWay(Merge ::IFolderComparisonPtr automationObject); | 235 | extern void setThreeWay(Merge65::IFolderComparisonPtr automationObject); | |||
238 | 236 | |||||
239 | // Force a file comparison window into three-way mode. | 237 | // Force a file comparison window into three-way mode. | |||
240 | // | 238 | // | |||
241 | 239 | |||||
242 | extern void setThreeWay(Merge ::IFileComparison2Ptr automationObject); | 240 | extern void setThreeWay(Merge65::IFileComparison Ptr automationObject); | |||
243 | 241 | |||||
244 | // Starts a file/folder comparison. The type of comparison is defined | 242 | // Starts a file/folder comparison. The type of comparison is defined | |||
245 | // by the arguments to this method. If instructed to wait for | 243 | // by the arguments to this method. If instructed to wait for | |||
246 | // the comparison to complete, this method sets up a sink for | 244 | // the comparison to complete, this method sets up a sink for | |||
247 | // events from the file comparison window. It is up to the caller | 245 | // events from the file comparison window. It is up to the caller | |||
248 | // to set up a message pump and wait for the event sink object | 246 | // to set up a message pump and wait for the event sink object | |||
249 | // to post a WM_QUIT message to the main message queue. | 247 | // to post a WM_QUIT message to the main message queue. | |||
250 | // | 248 | // | |||
251 | 249 | |||||
252 | template <class WaitType, class Events, class AutomationType> | 250 | template <class WaitType, class Events, class AutomationType> | |||
(3 unchanged lines omitted) | ||||||
256 | const bool& bWait, | 254 | const bool& bWait, | |||
257 | const StringVector& arguments, | 255 | const StringVector& arguments, | |||
258 | const bool& bSetTitles, | 256 | const bool& bSetTitles, | |||
259 | const StringVector& titles, | 257 | const StringVector& titles, | |||
260 | AutomationType& automationObject, | 258 | AutomationType& automationObject, | |||
261 | const bool& bMerge = false, | 259 | const bool& bMerge = false, | |||
262 | const bool& bTestConflicts = false) | 260 | const bool& bTestConflicts = false) | |||
263 | { | 261 | { | |||
264 | ReturnCode nResult(rcSucceeded); | 262 | ReturnCode nResult(rcSucceeded); | |||
265 | 263 | |||||
266 | Merge ::IApplicationPtr pApp; | 264 | Merge65::IApplicationPtr pApp; | |||
267 | 265 | |||||
268 | // Create a Merge application object. This will cause Merge | 266 | // Create a Merge application object. This will cause Merge | |||
269 | // to be started if it isn't already running. | 267 | // to be started if it isn't already running. | |||
270 | HRESULT hr( | 268 | HRESULT hr( | |||
271 | CoCreateInstance( | 269 | CoCreateInstance( | |||
272 | __uuidof(Merge ::Application), 0, CLSCTX_SERVER, | 270 | __uuidof(Merge65::Application), 0, CLSCTX_SERVER, | |||
273 | __uuidof(Merge ::IApplication), (void**)&pApp)); | 271 | __uuidof(Merge65::IApplication), (void**)&pApp)); | |||
274 | 272 | |||||
275 | if (SUCCEEDED(hr)) | 273 | if (SUCCEEDED(hr)) | |||
276 | { | 274 | { | |||
277 | try | 275 | try | |||
278 | { | 276 | { | |||
279 | try | 277 | try | |||
280 | { | 278 | { | |||
281 | // Make Merge visible and active. | 279 | // Make Merge visible and active. | |||
282 | if (pApp->Minimized) | 280 | if (pApp->Minimized) | |||
283 | pApp->Restore(); | 281 | pApp->Restore(); | |||
284 | pApp->Visible = VARIANT_TRUE; | 282 | pApp->Visible = VARIANT_TRUE; | |||
285 | 283 | |||||
286 | bool bMaximizePreference = | 284 | bool bMaximizePreference = | |||
287 | pApp->Preferences->Longs->Item[Merge ::clAppMax] ? true : false; | 285 | pApp->Preferences->Longs->Item[Merge65::clAppMax] ? true : false; | |||
288 | 286 | |||||
289 | if (bMaximize || bMaximizePreference) | 287 | if (bMaximize || bMaximizePreference) | |||
290 | pApp->Maximized = VARIANT_TRUE; | 288 | pApp->Maximized = VARIANT_TRUE; | |||
291 | } | 289 | } | |||
292 | catch (_com_error e) | 290 | catch (_com_error e) | |||
293 | { | 291 | { | |||
294 | ReportError(e, _T("showing the Merge application window.")); | 292 | ReportError(e, _T("showing the Merge application window.")); | |||
295 | throw; | 293 | throw; | |||
296 | } | 294 | } | |||
297 | catch (...) | 295 | catch (...) | |||
(206 unchanged lines omitted) | ||||||
504 | const StringVector& arguments, | 502 | const StringVector& arguments, | |||
505 | bool bTwoWay, | 503 | bool bTwoWay, | |||
506 | bool bMaximized, | 504 | bool bMaximized, | |||
507 | bool bWait, | 505 | bool bWait, | |||
508 | bool bSetTitles, | 506 | bool bSetTitles, | |||
509 | const StringVector& titles, | 507 | const StringVector& titles, | |||
510 | bool bMerge, | 508 | bool bMerge, | |||
511 | bool bTestConflicts); | 509 | bool bTestConflicts); | |||
512 | 510 | |||||
513 | } | 511 | } |
Araxis Merge (but not this generated report) is Copyright © 1993-2003 Araxis Ltd (www.araxis.com). All rights reserved.