undoitem.cpp

来自「So you wanted to add a forms editor to y」· C++ 代码 · 共 58 行

CPP
58
字号
/* ==========================================================================
	Class :			CUndoItem

	Date :			06/04/04

	Purpose :		The "CUndoItem" class represents a single state of the 
					application data, and is used for the undo-handling.

	Description :	The class is a simple data-holder with members for the 
					screen size and an array with copies of all the objects 
					in the container at the time the instance of this class 
					was created. Instantiation is made in 
					"CDiagramEntityContainer::Snapshot".

	Usage :			See "CDiagramEntityContainer" on how to use the class.

   ========================================================================*/

#include "stdafx.h"
#include "UndoItem.h"

// Construction/destruction
CUndoItem::CUndoItem()
/* ============================================================
	Function :		CUndoItem::CUndoItem
	Description :	constructor
	Access :		Public

	Return :		void
	Parameters :	none

	Usage :			

   ============================================================*/
{
}

CUndoItem::~CUndoItem()
/* ============================================================
	Function :		CUndoItem::~CUndoItem
	Description :	Destructor
	Access :		Public

	Return :		void
	Parameters :	none

	Usage :			Deletes all associated memory.

   ============================================================*/
{

	int max = arr.GetSize();
	for (int t = 0 ; t < max ; t++ )
		delete arr.GetAt( t );
	arr.RemoveAll();

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?