⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modelactionhandler.cpp

📁 A Model-View-Controller Framework that integrates with the MFC Doc/View architecture.
💻 CPP
字号:
// ActionHandler.cpp : implementation file
//

#include "stdafx.h"
#include "ModelActionHandler.h"
#include "ModelAction.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif


namespace SbjCore
{
	namespace Mvc
	{
		namespace Model
		{
			struct ActionHandlerImpl
			{
				Action* pTheAction; 
				HANDLE hItem;

				ActionHandlerImpl()
				{
				}
				virtual ~ActionHandlerImpl()
				{
				}
			};

			/////////////////////////////////////////////////////////

			IMPLEMENT_DYNCREATE(ActionHandler, CCmdTarget)

			ActionHandler::ActionHandler() :
				m_pImpl(new ActionHandlerImpl)
			{
			}

			ActionHandler::~ActionHandler()
			{
				try
				{
					delete m_pImpl;
				}
				catch(...)
				{
					ASSERT(FALSE);
				}
			}

			Action* ActionHandler::GetAction() const
			{
				return m_pImpl->pTheAction;
			}

			HANDLE ActionHandler::GetItem() const
			{
				return m_pImpl->hItem;
			}

			void ActionHandler::Initialize( Action* pAction, HANDLE hItem )
			{
				m_pImpl->pTheAction = pAction;
				m_pImpl->hItem = hItem;
			}

			int ActionHandler::BeginHandling()
			{
				return OnBeginHandling();
			}

			int ActionHandler::EndHandling()
			{
				return OnEndHandling();
			}

			int ActionHandler::OnBeginHandling()
			{
				return Action::kContinue;
			}

			int ActionHandler::OnEndHandling()
			{
				return Action::kContinue;
			}
		}
	}
}

⌨️ 快捷键说明

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