You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
612 B
C++

#include "StdAfx.h"
#include "CommandBase.h"
#include "EasyOperationMgr.h"
CCommandBase::CCommandBase(void)
{
}
CCommandBase::~CCommandBase(void)
{
}
//<2F><><EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void CCommandBase::AddOpObj(Sptr<CObjBase> p)
{
m_ObjContainer.AddObject(p);
}
void CCommandBase::AddOpObj(CObjBase *p)
{
//<2F><><EFBFBD><EFBFBD><E6B5BD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
Sptr<CObjBase> sPtr(p);
AddOpObj(sPtr);
}
//<2F>Ƿ<EFBFBD><C7B7>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bool CCommandBase::HasOpObj()
{
return !m_ObjContainer.Empty();
}
void CCommandBase::Excute()
{
ExcuteExt();
gEasyOperationMgr->Refresh();
}
void CCommandBase::Undo()
{
UndoExt();
gEasyOperationMgr->Refresh();
}