#ifndef CIMEXPORTER_H #define CIMEXPORTER_H #include #include "element/line.h" #include "element/switch.h" #include "element/transformer.h" #include #include #include #include #include #include #include #include #include "recursedir.h" #include "substation.h" #include "loadmapping.h" #include "loadinfo.h" #include //#include "elementhashtable.h" class Substation; class CIMExporter { struct BranchStruc { QString fromID; QString toID; int fromNum; int toNum; }; struct LineStru:public BranchStruc { Line *line; }; struct SwitchStru:public BranchStruc { Switch *sw; }; struct TransformerStru:public BranchStruc { Transformer *tf; }; public: explicit CIMExporter(const QHash& eleHT,const QString& loadDir); void add(const QPair& fromTo,Line* line); void add(const QPair& fromTo,Switch* sw); void add(const QPair& fromTo,Transformer* tf); void exportTo(const QString& path); private: QList line; QList sw; QList tf; QHash number; int numberIt(const QString &id);//编号 template void idToNumber(QList &s);//把所有元件的标识进行编号 QString loadDir; const QHash& eleHT; }; #endif // CIMEXPORTER_H