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.

46 lines
973 B
C++

#include "StdAfx.h"
#include "CommandReverse.h"
#include "Layer.h"
#include "GlobalFunction.h"
CCommandReverse::CCommandReverse(void)
{
}
CCommandReverse::~CCommandReverse(void)
{
}
void CCommandReverse::ExcuteExt()
{
Operater();
}
void CCommandReverse::UndoExt()
{
Operater();
}
CString CCommandReverse::GetStr()
{
CString str = "_reverse <20><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>-----";
vector<Sptr<CObjBase>> &vec = m_ObjContainer.GetObjVec();
if(vec.empty()==false)
{
CString str1;
str1.Format("%ld",vec.size());
str +="[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] : <"+str1+">";
}
return str;
}
void CCommandReverse::Operater()
{
vector<Sptr<CObjBase>> &vec = m_ObjContainer.GetObjVec();
vector<Sptr<CObjBase>>::iterator iter = vec.begin();
vector<Sptr<CObjBase>>::iterator iter_end = vec.end();
for(;iter!=iter_end;iter++)
{
if((*iter).IsNull()==false)
{
(*iter)->Operate(m_Par);
}
}
}