2014-11-22 11:32:12 +08:00
|
|
|
#ifndef ELEMENTHASHTABLE_H
|
|
|
|
|
#define ELEMENTHASHTABLE_H
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QXmlStreamReader>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
#include <QFile>
|
2015-01-07 21:57:50 +08:00
|
|
|
#include <QTextStream>
|
2014-11-22 11:32:12 +08:00
|
|
|
#include <QHash>
|
2014-12-06 21:48:07 +08:00
|
|
|
#include <QVector>
|
2014-11-22 11:32:12 +08:00
|
|
|
#include "BasicElementInfo.h"
|
|
|
|
|
#include "subcontrolarea.h"
|
2014-11-22 22:18:18 +08:00
|
|
|
#include "busbarsection.h"
|
|
|
|
|
#include "terminal.h"
|
|
|
|
|
#include "aclinesegment.h"
|
|
|
|
|
#include "breaker.h"
|
|
|
|
|
#include "compensator.h"
|
|
|
|
|
#include "disconnector.h"
|
|
|
|
|
#include "powertransformer.h"
|
|
|
|
|
#include "synchronousmachine.h"
|
2014-12-06 21:48:07 +08:00
|
|
|
#include "topologyrecorder.h"
|
2014-11-22 11:32:12 +08:00
|
|
|
class ElementHashtable : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
explicit ElementHashtable(QObject *parent = 0);
|
2014-12-06 21:48:07 +08:00
|
|
|
bool Parse(const QString& xmlPWPath,const QString& xmlZWPath);
|
|
|
|
|
bool GoPath();
|
2015-01-06 20:51:19 +08:00
|
|
|
void SetACLineID(const QString &id);//寻找的线路ID
|
|
|
|
|
void SetFDSet(const QVector<QString> &FDSet);//FeeDer集合
|
2015-01-07 21:57:50 +08:00
|
|
|
void ShowContainerInfo(const QString& fileName);
|
2014-11-22 11:32:12 +08:00
|
|
|
private:
|
|
|
|
|
bool child(QXmlStreamReader &reader);
|
2014-12-06 21:48:07 +08:00
|
|
|
bool setCurrentHashTable(QHash<QString,BasicElementInfo *> *t);
|
|
|
|
|
bool parse(const QString& xmlPath);
|
2014-11-24 22:01:30 +08:00
|
|
|
QHash<QString,BasicElementInfo *> eleHT;
|
2014-12-06 21:48:07 +08:00
|
|
|
QHash<QString,BasicElementInfo *> mainStationHT;//记录主站的元素
|
2014-11-26 20:49:33 +08:00
|
|
|
NodeToTerminal nodeToTerminal;
|
2014-12-06 21:48:07 +08:00
|
|
|
QHash<QString,BasicElementInfo *> *currentHT;
|
2015-01-06 20:51:19 +08:00
|
|
|
QString lineID;
|
|
|
|
|
QVector<QString> FDSet;
|
2015-01-07 21:57:50 +08:00
|
|
|
TopologyRecorder *tpRecorder;
|
2014-11-22 11:32:12 +08:00
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // ELEMENTHASHTABLE_H
|