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.

50 lines
1.0 KiB
C++

#include "StdAfx.h"
#include "CommandAddNode.h"
CCommandAddNode::CCommandAddNode(void)
{
}
CCommandAddNode::~CCommandAddNode(void)
{
}
void CCommandAddNode::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)->InsertNode(m_idx,m_pt);
}
}
}
void CCommandAddNode::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)->DelNodePtByIdx(m_idx);
}
}
}
CString CCommandAddNode::GetStr()
{
CString str = "_add_node Ìí¼Ó½Úµã-----";
return str;
}
void CCommandAddNode::SetPar(int idx,Dbxy pt)
{
m_idx = idx;
m_pt = pt;
}