测试了自动编号功能

Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
facat@lab.com 2014-12-28 17:49:16 +08:00
parent 7fa4d1d98b
commit af8f64dfd0
4 changed files with 18 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#include "cimexporter.h"
#include <iostream>
CIMExporter::CIMExporter()
{
}
@ -37,6 +37,15 @@ void CIMExporter::exportTo(const QString& path)
this->idToNumber(this->line);
this->idToNumber(this->sw);
this->idToNumber(this->tf);
//开始按要求输出
for(QList<CIMExporter::LineStru>::iterator ite=this->line.begin();
ite!=this->line.end();
ite++)
{
LineStru l=*ite;
std::cout<<l.fromID.toStdString()<<" "<<l.fromNum<<" ";
std::cout<<l.toID.toStdString()<<" "<<l.toNum<<std::endl;
}
}

View File

@ -98,6 +98,8 @@ bool ElementHashtable::GoPath()
std::cout<<node.toStdString()<<std::endl;
TopologyRecorder tpRecorder(this->eleHT);
tpRecorder.startWithNode(node);
tpRecorder.exportTo("");
break;
}
}

View File

@ -25,6 +25,11 @@ bool TopologyRecorder::isEquipmentNeeded(const QString& substatinID)
return false;
}
void TopologyRecorder::exportTo(const QString& path)
{
this->cimExporter.exportTo(path);
}
bool TopologyRecorder::startWithNode(const QString& node)
{
if(node=="")

View File

@ -32,6 +32,7 @@ public:
TopologyRecorder(const QHash<QString,BasicElementInfo *>& elementHT,QObject *parent=0);
~TopologyRecorder();
bool startWithNode(const QString& node);
void exportTo(const QString& path);
private:
NodeToTerminal nodeToTerminal;
const QHash<QString,BasicElementInfo *>& eleHT;