From 01c77d20451cceeaded941943bc45e0b43355d5f Mon Sep 17 00:00:00 2001 From: "dmy@lab" Date: Thu, 22 Jan 2015 15:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E8=B4=9F=E8=8D=B7=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E7=9A=84=E6=97=B6=E5=80=99=E5=8F=AF=E8=83=BD=E6=9C=89?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E7=9A=84Substation=20ID=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E6=8A=8A=E4=BB=96=E4=BB=AC=E5=85=A8=E9=83=A8=E5=92=8C=E8=B5=B7?= =?UTF-8?q?=E6=9D=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dmy@lab --- testHasttable/cimexporter.cpp | 4 ++-- testHasttable/elementreduction.cpp | 22 +++++++++++----------- testHasttable/loadmapping.cpp | 19 +++++++++++-------- testHasttable/main.cpp | 2 +- testHasttable/task.txt | 3 ++- 5 files changed, 27 insertions(+), 23 deletions(-) diff --git a/testHasttable/cimexporter.cpp b/testHasttable/cimexporter.cpp index 180c447..de8c931 100644 --- a/testHasttable/cimexporter.cpp +++ b/testHasttable/cimexporter.cpp @@ -154,7 +154,7 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID) { QFileInfo targetBasename(p->getLoadPath()); -// std::cout<<"search for "<getLoadPath().toLocal8Bit().data()< &s)//把所有元件的标识进行编号 { if(ite->dispose) { - std::cout<id.toStdString()<<" dispose"<id.toStdString()<<" dispose"<id]=v; linkage[v->fromID].push_back(v); linkage[v->toID].push_back(v); - std::cout<fromID.toStdString()<<" "<id.toStdString()<<" "<toID.toStdString()<fromID.toStdString()<<" "<id.toStdString()<<" "<toID.toStdString()<buildTreeTo(element,root,linkage,idToBranch); // this->visited.remove(this->branchList.at(2)->id); - this->buildTreeFrom(element,root,linkage,idToBranch); +// this->buildTreeFrom(element,root,linkage,idToBranch); this->merge(element,idToBranch); - QFile file("1.xml"); - if(file.open(QFile::WriteOnly)) - { -// root.setContent(&file); - QTextStream writer(&file); +// QFile file("1.xml"); +// if(file.open(QFile::WriteOnly)) +// { +//// root.setContent(&file); +// QTextStream writer(&file); - root.save(writer,4); - file.close(); - } +// root.save(writer,4); +// file.close(); +// } //看看是不是每个都访问到了 foreach(BranchStruc* v,this->branchList) { @@ -99,7 +99,7 @@ void ElementReduction::merge(QDomElement &element,QHash& branch->dispose=true; while(node.childNodes().length()>0) { - std::cout<<"append "< loadInfo=(*this->loadsToLoadInfo)[fileName]; -// std::cout<<"file name "<setLoadPath(filePath); } @@ -170,7 +170,7 @@ bool LoadMapping::readMatch(const QString& dir) QRegExp regExp("\\(.*\\)"); SFDid=sep.at(0); SFDid=SFDid.replace(regExp,""); - QVector > loads; +// QVector > loads; for(int i=1;iloadsToLoadInfo)[sep.at(i)]=t; +// if(SFDid=="SFD-43064") +// { +// std::cout<<"SFD-43064 "<getSubstationLoad("SFD-43064").length()<loads)[SFDid].push_back(t); } - (*this->loads)[SFDid]=loads; } file.close(); diff --git a/testHasttable/main.cpp b/testHasttable/main.cpp index 2ffac2b..441e0a7 100644 --- a/testHasttable/main.cpp +++ b/testHasttable/main.cpp @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) // LoadMapping lm; // lm.load("D:/Project/佛山项目/数据/搭网架参数文件/","D:/Project/佛山项目/数据/匹配的数据/","D:/Project/佛山项目/数据/exception.txt");//单例,执行一次行了。 -// std::cout<