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.
48 lines
968 B
C++
48 lines
968 B
C++
#include "StdAfx.h"
|
|
#include "CommandCreat.h"
|
|
#include "Layer.h"
|
|
#include "GlobalFunction.h"
|
|
|
|
|
|
CCommandCreat::CCommandCreat(void)
|
|
{
|
|
}
|
|
CCommandCreat::~CCommandCreat(void)
|
|
{
|
|
}
|
|
CString CCommandCreat::GetStr()
|
|
{
|
|
CString str = "_creat ´´½¨-----";
|
|
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)
|
|
{
|
|
str += ((*iter)->GetStr()+" ");
|
|
break;
|
|
}
|
|
}
|
|
if(vec.size()>1)
|
|
{
|
|
CString str1;
|
|
str1.Format("%ld",vec.size());
|
|
str +="[ÊýÁ¿] : <"+str1+">";
|
|
}
|
|
return str;
|
|
};
|
|
void CCommandCreat::ExcuteExt()
|
|
{
|
|
CLayer &layer = gLayer;
|
|
layer.AddObject(m_ObjContainer);
|
|
}
|
|
void CCommandCreat::UndoExt()
|
|
{
|
|
CLayer &layer = gLayer;
|
|
layer.DelObj(m_ObjContainer);
|
|
|
|
}
|
|
|
|
|