//AddInputs Action
class CAddInputAction: public CBaseAction
{
public:
CAddInputAction(const QVector<xml_node_struct*>& vecLDev,const SVTTable& Sub1,const SVTTable& Rel2,bool bDel){
LDeviceVec=vecLDev;info1Vt=Sub1;table2Vt=Rel2;bDeletePrevious=bDel;
}
bool isGoose()const{return info1Vt.type==eVTTGooseSub;}
//in case @virtual is no-empty
bool isNeedCheck()const{
return !PuginTool::getIEDVirtual(LDeviceVec[0],info1Vt.sRefer.devName).isEmpty();
}
//override
virtual void DoIt(){
for (int a = 0; a < LDeviceVec.size(); ++a)
CTraPuginXml::addInputsVT(LDeviceVec[a],info1Vt.refer/*sub-side*/,table2Vt.sRefer,bDeletePrevious);
}
/*private:*/
QVector<xml_node_struct*> LDeviceVec;
SVTTable info1Vt;//sub-side(first)
SVTTable table2Vt;//rel-side(second)
bool bDeletePrevious;
};
the snap is below the class CAddInputAction definition.All located in the same cpp.