OSDN Git Service

Comment additions and fixes.
authorKimmo Varis <kimmov@gmail.com>
Tue, 16 Oct 2007 10:56:17 +0000 (10:56 +0000)
committerKimmo Varis <kimmov@gmail.com>
Tue, 16 Oct 2007 10:56:17 +0000 (10:56 +0000)
Src/TestFilterDlg.cpp
Src/TestFilterDlg.h

index bd19977..7fe7c0c 100644 (file)
@@ -3,7 +3,7 @@
  *
  * @brief Dialog for testing file filters
  */
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #include "stdafx.h"
 static char THIS_FILE[] = __FILE__;
 #endif
 
-/////////////////////////////////////////////////////////////////////////////
-// CTestFilterDlg dialog
-
-
+/**
+ * @brief Constructor.
+ * @param [in] pParent Parent window.
+ * @param [in] pFileFilter File filter to test.
+ * @param [in] pFilterMgr File filter manager.
+ */
 CTestFilterDlg::CTestFilterDlg(CWnd* pParent, FileFilter * pFileFilter, FileFilterMgr *pFilterMgr)
 : CDialog(CTestFilterDlg::IDD, pParent)
 , m_pFileFilter(pFileFilter)
 , m_pFileFilterMgr(pFilterMgr)
 {
-       //{{AFX_DATA_INIT(CTestFilterDlg)
-               // NOTE: the ClassWizard will add member initialization here
-       //}}AFX_DATA_INIT
 }
 
-
 void CTestFilterDlg::DoDataExchange(CDataExchange* pDX)
 {
        CDialog::DoDataExchange(pDX);
@@ -50,7 +48,11 @@ END_MESSAGE_MAP()
 /////////////////////////////////////////////////////////////////////////////
 // CTestFilterDlg message handlers
 
-BOOL CTestFilterDlg::OnInitDialog() 
+/**
+ * @brief Initialize the dialog.
+ * @return FALSE always.
+ */
+BOOL CTestFilterDlg::OnInitDialog()
 {
        CDialog::OnInitDialog();
 
@@ -63,7 +65,7 @@ BOOL CTestFilterDlg::OnInitDialog()
                      // EXCEPTION: OCX Property Pages should return FALSE
 }
 
-/** @brief User pressed Text button */
+/** @brief User pressed Text button. */
 void CTestFilterDlg::OnTestBtn() 
 {
        CString text;
@@ -77,7 +79,7 @@ void CTestFilterDlg::OnTestBtn()
        AppendResult(text);
 }
 
-/** @brief user pressed <enter> key */
+/** @brief user pressed <enter> key. */
 void CTestFilterDlg::OnOK()
 {
    CWnd *pWnd = GetFocus(); 
@@ -92,7 +94,11 @@ void CTestFilterDlg::OnOK()
    }
 }
 
-/** @brief Return true if specified text passes our filter */
+/**
+ * @brief Test text against filter.
+ * @param [in] text Text to test.
+ * @return TRUE if text passes the filter, FALSE otherwise.
+ */
 BOOL CTestFilterDlg::CheckText(CString text) const
 {
        CButton * IsDirButton = (CButton *)GetDlgItem(IDC_IS_DIRECTORY);
@@ -107,10 +113,13 @@ BOOL CTestFilterDlg::CheckText(CString text) const
        {
                return m_pFileFilterMgr->TestFileNameAgainstFilter(m_pFileFilter, text);
        }
-
 }
 
-/** @brief Add text to end of edit control */
+/**
+ * @brief Add text to end of edit control.
+ * @param [in] edit Edit contror into which the text is added.
+ * @param [in] text Text to add to edit control.
+ */
 void AppendToEditBox(CEdit & edit, LPCTSTR text)
 {
        int len = edit.GetWindowTextLength();
@@ -118,7 +127,10 @@ void AppendToEditBox(CEdit & edit, LPCTSTR text)
        edit.ReplaceSel(text);
 }
 
-/** @brief Add new result to end of result edit box */
+/**
+ * @brief Add new result to end of result edit box.
+ * @param [in] result Result text to add.
+ */
 void CTestFilterDlg::AppendResult(CString result)
 {
        CEdit * edit = (CEdit *)GetDlgItem(IDC_RESULTS);
index 6234cae..316cdeb 100644 (file)
@@ -4,20 +4,20 @@
  * @brief Declaration file for CTestFilterDlg class
  *
  */
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #if !defined(AFX_TESTFILTERDLG_H__1261AD7A_512F_47BC_882F_2E2D41C5072F__INCLUDED_)
 #define AFX_TESTFILTERDLG_H__1261AD7A_512F_47BC_882F_2E2D41C5072F__INCLUDED_
 #pragma once
 
-/////////////////////////////////////////////////////////////////////////////
-// CTestFilterDlg dialog
-
 struct FileFilter;
 class FileFilterMgr;
 
-/** @brief Dialog allowing user to test out file filter strings */
+/**
+ * @brief Dialog allowing user to test out file filter strings.
+ * The user can type a text and test if selected file filter matches to it.
+ */
 class CTestFilterDlg : public CDialog
 {
 // Construction
@@ -26,8 +26,8 @@ public:
 
 // Implementation data
 private:
-       FileFilter * m_pFileFilter;
-       FileFilterMgr * m_pFileFilterMgr;
+       FileFilter * m_pFileFilter; /**< Selected file filter. */
+       FileFilterMgr * m_pFileFilterMgr; /**< File filter manager. */
 
 // Implementation methods
 private: