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
1.0 KiB
C++

#include "StdAfx.h"
#include "CommandDelNode.h"
CCommandDelNode::CCommandDelNode(void)
{
}
CCommandDelNode::~CCommandDelNode(void)
{
}
void CCommandDelNode::ExcuteExt()
{
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)->DelNodePtByIdx(m_idx);
}
}
}
void CCommandDelNode::UndoExt()
{
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)->InsertNode(m_idx,m_pt);
}
}
}
CString CCommandDelNode::GetStr()
{
CString str = "_del_node ɾ<><C9BE><EFBFBD>ڵ<EFBFBD>-----";
return str;
}
void CCommandDelNode::SetPar(int idx,Dbxy pt)
{
m_idx = idx;
m_pt = pt;
}