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.
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "CommandArray.h"
|
|
|
|
|
#include "Layer.h"
|
|
|
|
|
#include "GlobalFunction.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CCommandArray::CCommandArray(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CCommandArray::~CCommandArray(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
void CCommandArray::ExcuteExt()
|
|
|
|
|
{
|
|
|
|
|
CLayer &layer = gLayer;
|
|
|
|
|
//<2F><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>obj
|
|
|
|
|
layer.DelObj(m_BaseObjContainer);
|
|
|
|
|
//<2F>ٵ<EFBFBD><D9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD>
|
|
|
|
|
layer.AddObject(m_ObjContainer);
|
|
|
|
|
}
|
|
|
|
|
void CCommandArray::UndoExt()
|
|
|
|
|
{
|
|
|
|
|
CLayer &layer = gLayer;
|
|
|
|
|
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD>
|
|
|
|
|
layer.DelObj(m_ObjContainer);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD>
|
|
|
|
|
layer.AddObject(m_BaseObjContainer);
|
|
|
|
|
}
|
|
|
|
|
CString CCommandArray::GetStr()
|
|
|
|
|
{
|
|
|
|
|
CString str = "_array <20><><EFBFBD><EFBFBD>-----";
|
|
|
|
|
vector<Sptr<CObjBase>> &vec = m_ObjContainer.GetObjVec();
|
|
|
|
|
vector<Sptr<CObjBase>>::iterator iter = vec.begin();
|
|
|
|
|
vector<Sptr<CObjBase>>::iterator iter_end = vec.end();
|
|
|
|
|
if(vec.size()>1)
|
|
|
|
|
{
|
|
|
|
|
CString str1;
|
|
|
|
|
str1.Format("%ld",vec.size());
|
|
|
|
|
str +="[<5B><><EFBFBD><EFBFBD>] : <"+str1+">";
|
|
|
|
|
}
|
|
|
|
|
return str;
|
|
|
|
|
};
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>obj
|
|
|
|
|
void CCommandArray::SaveBaseObj(CObjContainer &ObjContainer)
|
|
|
|
|
{
|
|
|
|
|
ObjContainer.AllObjAddToContainer(m_BaseObjContainer,true);
|
|
|
|
|
}
|