OSDN Git Service

Adding licence text and comments
authorKimmo Varis <kimmov@gmail.com>
Fri, 22 Aug 2003 22:21:16 +0000 (22:21 +0000)
committerKimmo Varis <kimmov@gmail.com>
Fri, 22 Aug 2003 22:21:16 +0000 (22:21 +0000)
Src/DiffThread.cpp
Src/DiffThread.h
Src/DiffWrapper.h
Src/readme.txt

index eb22f54..31236bb 100644 (file)
@@ -1,13 +1,41 @@
+/////////////////////////////////////////////////////////////////////////////
+//    License (GPLv2+):
+//    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.
+/////////////////////////////////////////////////////////////////////////////
+/** 
+ * @file  DiffThread.cpp
+ *
+ * @brief Code for DiffThread class
+ */
+// RCS ID line follows -- this is updated by CVS
+// $Id$
+
 #include "stdafx.h"
 #include "diffcontext.h"
 #include "diffthread.h"
 #include "diff.h"
 #include "DirScan.h"
 
-// Static structure for sharing data with thread
+/**
+ * @brief Static structure for sharing data with thread
+ */
 static DiffFuncStruct diffParam;
 
-
+/**
+ * @brief Default constructor
+ */
 CDiffThread::CDiffThread()
 {
        m_pDiffContext = NULL;
@@ -20,6 +48,9 @@ CDiffThread::~CDiffThread()
 
 }
 
+/**
+ * @brief Sets context pointer forwarded to thread
+ */
 CDiffContext * CDiffThread::SetContext(CDiffContext * pCtx)
 {
        CDiffContext *pTempContext = m_pDiffContext;
@@ -27,8 +58,9 @@ CDiffContext * CDiffThread::SetContext(CDiffContext * pCtx)
        return pTempContext;
 }
 
-// Launch worker thread
-// called on main thread
+/**
+ * @brief Start directory compare thread
+ */
 UINT CDiffThread::CompareDirectories(CString dir1, CString dir2)
 {
        diffParam.path1 = dir1;
@@ -42,23 +74,36 @@ UINT CDiffThread::CompareDirectories(CString dir1, CString dir2)
        return 1;
 }
 
+/**
+ * @brief Set window receiving messages thread sends
+ */
 void CDiffThread::SetHwnd(HWND hWnd)
 {
        m_hWnd = hWnd;
 }
 
+/**
+ * @brief Set message-id and -number for messages thread sends to window
+ */
 void CDiffThread::SetMessageIDs(UINT updateMsg, UINT statusMsg)
 {
        m_msgUpdateUI = updateMsg;
        m_msgUpdateStatus = statusMsg;
 }
 
+/**
+ * @brief Returns thread's current state
+ */
 UINT CDiffThread::GetThreadState()
 {
        return diffParam.nThreadState;
 }
 
-// called on worker thread
+/**
+ * @brief Directory compare thread function
+ * Calls diffutils's compare_files() and after compare is ready
+ * sends message to UI so UI can update itself.
+ */
 UINT DiffThread(LPVOID lpParam)
 {
        DiffFuncStruct *myStruct = (DiffFuncStruct *) lpParam;
index a37541b..f19ff21 100644 (file)
@@ -1,8 +1,35 @@
-#ifndef _DIFFTHREAD_H
+/////////////////////////////////////////////////////////////////////////////
+//    License (GPLv2+):
+//    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.
+/////////////////////////////////////////////////////////////////////////////
+/** 
+ * @file  DiffThread.h
+ *
+ * @brief Declaration file for CDiffThread
+ */
+// RCS ID line follows -- this is updated by CVS
+// $Id$
+
+#ifndef _DIFFTTHREAD_H
 #define _DIFFTHREAD_H
 
 #include "diffcontext.h"
 
+/**
+ * @brief Thread's statuses
+ */
 enum
 {
        THREAD_NOTSTARTED = 0,
@@ -10,6 +37,9 @@ enum
        THREAD_COMPLETED
 };
 
+/**
+ * @brief Data sent to diff thread
+ */
 struct DiffFuncStruct
 {
        CString path1;
@@ -21,6 +51,10 @@ struct DiffFuncStruct
        UINT nThreadState;
 };
 
+/**
+ * @brief Class for threaded directory compare
+ * This class takes care of starting directory compare thread
+ */
 class CDiffThread
 {
 public:
index 31954a2..d3f06e5 100644 (file)
@@ -17,7 +17,7 @@
 /** 
  * @file  DiffWrapper.h
  *
- * @brief Declaration file for CDirColsDlg
+ * @brief Declaration file for CDiffWrapper
  *
  * @date  Created: 2003-08-22
  */
index d49b5eb..e0f745c 100644 (file)
@@ -4,6 +4,8 @@
    Added: DiffWrapper.h DiffWrapper.cpp
  Adding licence text and comments
   WinMerge: files.h files.cpp
+ Adding licence text and comments
+  WinMerge: DiffThread.h DiffThread.cpp DiffWrapper.h
 
 2003-08-20 Perry
  PATCH: [ 791924 ] Fix sorting when columns are reordered