@@ -11,6 +11,8 @@
|
||||
#include <QTextStream>
|
||||
#include <QRegExp>
|
||||
#include <QSharedPointer>
|
||||
#include <QTime>
|
||||
#include <QList>
|
||||
|
||||
#include "recursedir.h"
|
||||
#include "loadinfo.h"
|
||||
@@ -21,6 +23,7 @@ class LoadMapping
|
||||
public:
|
||||
LoadMapping();
|
||||
~LoadMapping();
|
||||
bool broadcastUpdateByTime(const QTime& time);
|
||||
bool load(const QString& loadDir, const QString &matchdDir, const QString &exceptionFile);
|
||||
bool readLoads(const QString& dir);
|
||||
bool readMatch(const QString& dir);
|
||||
@@ -30,14 +33,16 @@ private:
|
||||
public:
|
||||
~CG()
|
||||
{
|
||||
if (LoadMapping::ht)
|
||||
delete LoadMapping::ht;
|
||||
if (LoadMapping::loadsToLoadInfo)
|
||||
delete LoadMapping::loadsToLoadInfo;
|
||||
if (LoadMapping::loads)
|
||||
delete LoadMapping::loads;
|
||||
}
|
||||
};
|
||||
static CG Garbo; // 定义一个静态成员,在程序结束时,系统会调用它的析构函数
|
||||
static QHash<QString,QVector<double> > *ht;
|
||||
QHash<QString,QVector<QSharedPointer<LoadInfo> > > loads;
|
||||
QHash<QString,QSharedPointer<LoadInfo> > loadsToLoadInfo;
|
||||
// static QHash<QString,QVector<double> > *ht;//
|
||||
static QHash<QString,QVector<QSharedPointer<LoadInfo> > > *loads;//保存的是一个Substation下面的所有负荷信息
|
||||
static QHash<QString,QSharedPointer<LoadInfo> > *loadsToLoadInfo;
|
||||
LoadMatchException loadMatchException;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user