parent
7fa4d1d98b
commit
af8f64dfd0
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ bool ElementHashtable::GoPath()
|
|||
std::cout<<node.toStdString()<<std::endl;
|
||||
TopologyRecorder tpRecorder(this->eleHT);
|
||||
tpRecorder.startWithNode(node);
|
||||
tpRecorder.exportTo("");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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=="")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue