parent
a27bb65465
commit
936c4a7e6f
|
|
@ -28,6 +28,19 @@ bool Breaker::derivedParse(QXmlStreamReader &reader)
|
||||||
this->equipmentContainer=ss.replace("#","").leftRef(-1).toString();
|
this->equipmentContainer=ss.replace("#","").leftRef(-1).toString();
|
||||||
qDebug()<<"got "<<"Equipment.MemberOf_EquipmentContainer "<<this->equipmentContainer<<"\n";
|
qDebug()<<"got "<<"Equipment.MemberOf_EquipmentContainer "<<this->equipmentContainer<<"\n";
|
||||||
}
|
}
|
||||||
|
if("Switch.normalOpen"==reader.name())
|
||||||
|
{
|
||||||
|
QString open=reader.readElementText();
|
||||||
|
if(open=="TRUE")
|
||||||
|
{
|
||||||
|
this->isOpen=true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->isOpen=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,12 @@ public:
|
||||||
virtual bool parse(QXmlStreamReader& reader);
|
virtual bool parse(QXmlStreamReader& reader);
|
||||||
QString getTerminalA();
|
QString getTerminalA();
|
||||||
QString getTerminalB();
|
QString getTerminalB();
|
||||||
|
bool getOpenState();
|
||||||
protected:
|
protected:
|
||||||
QString terminalA;
|
QString terminalA;
|
||||||
QString terminalB;
|
QString terminalB;
|
||||||
QString equipmentContainer;
|
QString equipmentContainer;
|
||||||
|
bool isOpen;
|
||||||
virtual bool derivedParse(QXmlStreamReader& reader);
|
virtual bool derivedParse(QXmlStreamReader& reader);
|
||||||
private:
|
private:
|
||||||
bool isTerminalA;
|
bool isTerminalA;
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,7 @@ NodeToTerminal::NodeToTerminal()
|
||||||
|
|
||||||
void NodeToTerminal::add(const QString& key,const QString& value)
|
void NodeToTerminal::add(const QString& key,const QString& value)
|
||||||
{
|
{
|
||||||
// if(this->contains(key))
|
|
||||||
// {
|
|
||||||
// std::cout<<"duplicat"<<std::endl;
|
|
||||||
// }
|
|
||||||
(*NodeToTerminal::ht)[key].push_back(value);
|
(*NodeToTerminal::ht)[key].push_back(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -27,24 +24,11 @@ bool NodeToTerminal::contains(const QString& key)
|
||||||
|
|
||||||
QVector<QString> NodeToTerminal::value(const QString& key)
|
QVector<QString> NodeToTerminal::value(const QString& key)
|
||||||
{
|
{
|
||||||
// if(NodeToTerminal::ht)
|
|
||||||
// {
|
|
||||||
// //return NodeToTerminal::ht->value(key);
|
|
||||||
// return "not null";
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// return "null";
|
|
||||||
// }
|
|
||||||
// return "";
|
|
||||||
return NodeToTerminal::ht->value(key);
|
return NodeToTerminal::ht->value(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeToTerminal::~NodeToTerminal()
|
NodeToTerminal::~NodeToTerminal()
|
||||||
{
|
{
|
||||||
// if(NodeToTerminal::ht)
|
|
||||||
// {
|
|
||||||
// delete NodeToTerminal::ht;
|
|
||||||
// NodeToTerminal::ht=NULL;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ class PowerTransformer:public BasicElementInfo
|
||||||
public:
|
public:
|
||||||
explicit PowerTransformer(QObject *parent = 0);
|
explicit PowerTransformer(QObject *parent = 0);
|
||||||
virtual bool parse(QXmlStreamReader& reader);
|
virtual bool parse(QXmlStreamReader& reader);
|
||||||
|
QString getNamingDescription();
|
||||||
protected:
|
protected:
|
||||||
QString terminalA;
|
QString terminalA;
|
||||||
QString terminalB;
|
QString terminalB;
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,13 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(ce.startsWith("TF"))
|
||||||
|
{
|
||||||
|
QString tfID=ce;
|
||||||
|
PowerTransformer *tf=static_cast<PowerTransformer *>(ht[tfID]);
|
||||||
|
std::cout<<"TF"<<tf->getNamingDescription().toStdString()<<std::endl;
|
||||||
|
// foundCate=true;
|
||||||
|
}
|
||||||
if(foundCate)
|
if(foundCate)
|
||||||
{
|
{
|
||||||
this->branch.push_back(fromTo);
|
this->branch.push_back(fromTo);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#include "aclinesegment.h"
|
#include "aclinesegment.h"
|
||||||
#include "nodetoterminal.h"
|
#include "nodetoterminal.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
#include "powertransformer.h"
|
||||||
class TopologyRecorder
|
class TopologyRecorder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue