Revision: 5407
http://winmerge.svn.sourceforge.net/winmerge/?rev=5407&view=rev
Author: kimmov
Date: 2008-06-01 03:58:45 -0700 (Sun, 01 Jun 2008)
Log Message:
-----------
Add some doxygen comments.
Modified Paths:
--------------
trunk/Src/GhostTextBuffer.cpp
trunk/Src/GhostTextBuffer.h
Modified: trunk/Src/GhostTextBuffer.cpp
===================================================================
--- trunk/Src/GhostTextBuffer.cpp 2008-06-01 09:28:58 UTC (rev 5406)
+++ trunk/Src/GhostTextBuffer.cpp 2008-06-01 10:58:45 UTC (rev 5407)
@@ -23,12 +23,17 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
/////////////////////////////////////////////////////////////////////////////
+/**
+ * @file GhostTextBuffer.cpp
+ *
+ * @brief Implementation of GhostTextBuffer class.
+ */
+// ID line follows -- this is updated by SVN
+// $Id$
-
#include "stdafx.h"
#include "GhostTextBuffer.h"
-
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
@@ -39,8 +44,6 @@
#define _ADVANCED_BUGCHECK 1
#endif
-
-
BEGIN_MESSAGE_MAP (CGhostTextBuffer, CCrystalTextBuffer)
//{{AFX_MSG_MAP(CGhostTextBuffer)
//}}AFX_MSG_MAP
@@ -235,9 +238,7 @@
////////////////////////////////////////////////////////////////////////////
// undo/redo functions
-
-
-void CGhostTextBuffer::SUndoRecord::
+<void CGhostTextBuffer::SUndoRecord::
SetText (LPCTSTR pszText, int nLength)
{
FreeText();
@@ -268,8 +269,6 @@
m_pszText = NULL;
}
-
-
BOOL CGhostTextBuffer::
Undo (CCrystalTextView * pSource, CPoint & ptCursorPos)
{
@@ -841,9 +840,6 @@
return TRUE;
}
-
-
-
BOOL CGhostTextBuffer::
InsertGhostLine (CCrystalTextView * pSource, int nLine)
{
@@ -884,8 +880,6 @@
RecomputeRealityMapping();
}
-
-
////////////////////////////////////////////////////////////////////////////
// apparent <-> real line conversion
@@ -901,8 +895,6 @@
return block.nStartApparent + block.nCount - 1;
}
-
-
/**
Return underlying real line.
For ghost lines, return NEXT HIGHER real line (for trailing ghost line, return last real line + 1).
@@ -1106,7 +1098,6 @@
return nApparent;
}
-
/** Do what we need to do just after we've been reloaded */
void CGhostTextBuffer::FinishLoading()
{
@@ -1238,7 +1229,6 @@
ASSERT ((GetLineFlags(i) & LF_GHOST) != 0);
}
-
void CGhostTextBuffer::OnNotifyLineHasBeenEdited(int nLine)
{
return;
Modified: trunk/Src/GhostTextBuffer.h
===================================================================
--- trunk/Src/GhostTextBuffer.h 2008-06-01 09:28:58 UTC (rev 5406)
+++ trunk/Src/GhostTextBuffer.h 2008-06-01 10:58:45 UTC (rev 5407)
@@ -3,45 +3,43 @@
*
* @brief Declaration of CGhostTextBuffer (subclasses CCrystalTextBuffer to handle ghost lines)
*/
+// ID line follows -- this is updated by SVN
+// $Id$
#ifndef __GHOSTTEXTBUFFER_H__
#define __GHOSTTEXTBUFFER_H__
-
#include "ccrystaltextbuffer.h"
/////////////////////////////////////////////////////////////////////////////
-/**
-We use the current ccrystalEditor flags
-
-This flag must be cleared and set in GhostTextBuffer.cpp
-and MergeDoc.cpp (Rescan) only.
-
-GetLineColors (in MergeEditView) reads it to choose the line color.
-*/
-
+/**
+ * We use the current ccrystalEditor flags
+ *
+ * This flag must be cleared and set in GhostTextBuffer.cpp
+ * and MergeDoc.cpp (Rescan) only.
+ *
+ * GetLineColors (in MergeEditView) reads it to choose the line color.
+ */
enum GHOST_LINEFLAGS
{
- LF_GHOST = 0x00400000L,
+ LF_GHOST = 0x00400000L, /**< Ghost line. */
};
-
-
-
/////////////////////////////////////////////////////////////////////////////
// CCrystalTextBuffer command target
/**
-Features offered with this class :
-<ul>
- <li> apparent/real line conversion
- <li> insertText/deleteText working with ghost lines
- <li> AddUndoRecord/Undo/Redo working with ghost lines
- <li> insertGhostLine function
-</ul>
-*/
+ * @brief A class handling ghost lines.
+ * Features offered with this class :
+ * <ul>
+ * <li> apparent/real line conversion
+ * <li> insertText/deleteText working with ghost lines
+ * <li> AddUndoRecord/Undo/Redo working with ghost lines
+ * <li> insertGhostLine function
+ * </ul>
+ */
class EDITPADC_CLASS CGhostTextBuffer : public CCrystalTextBuffer
{
public:
@@ -58,7 +56,7 @@
DWORD m_dwFlags;
DWORD m_dwRevisionNumber;
- int FullLength() const { return m_nLength+m_nEolChars; }
+ int FullLength() const { return m_nLength + m_nEolChars; }
int Length() const { return m_nLength; }
SLineInfo ()
@@ -103,7 +101,7 @@
// and (apparentLine - ComputeApparentLine(previousRealLine))
CPoint m_redo_ptStartPos, m_redo_ptEndPos; // Block of text participating
- int m_redo_ptStartPos_nGhost, m_redo_ptEndPos_nGhost;
+ int m_redo_ptStartPos_nGhost, m_redo_ptEndPos_nGhost;
int m_nRealLinesCreated; // number of lines created during insertion
// (= total of real lines after - total before)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|