parent
a27bb65465
commit
936c4a7e6f
|
|
@ -28,6 +28,19 @@ bool Breaker::derivedParse(QXmlStreamReader &reader)
|
|||
this->equipmentContainer=ss.replace("#","").leftRef(-1).toString();
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,12 @@ public:
|
|||
virtual bool parse(QXmlStreamReader& reader);
|
||||
QString getTerminalA();
|
||||
QString getTerminalB();
|
||||
bool getOpenState();
|
||||
protected:
|
||||
QString terminalA;
|
||||
QString terminalB;
|
||||
QString equipmentContainer;
|
||||
bool isOpen;
|
||||
virtual bool derivedParse(QXmlStreamReader& reader);
|
||||
private:
|
||||
bool isTerminalA;
|
||||
|
|
|
|||
|
|
@ -13,10 +13,7 @@ NodeToTerminal::NodeToTerminal()
|
|||
|
||||
void NodeToTerminal::add(const QString& key,const QString& value)
|
||||
{
|
||||
// if(this->contains(key))
|
||||
// {
|
||||
// std::cout<<"duplicat"<<std::endl;
|
||||
// }
|
||||
|
||||
(*NodeToTerminal::ht)[key].push_back(value);
|
||||
}
|
||||
|
||||
|
|
@ -27,24 +24,11 @@ bool NodeToTerminal::contains(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);
|
||||
}
|
||||
|
||||
NodeToTerminal::~NodeToTerminal()
|
||||
{
|
||||
// if(NodeToTerminal::ht)
|
||||
// {
|
||||
// delete NodeToTerminal::ht;
|
||||
// NodeToTerminal::ht=NULL;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ class PowerTransformer:public BasicElementInfo
|
|||
public:
|
||||
explicit PowerTransformer(QObject *parent = 0);
|
||||
virtual bool parse(QXmlStreamReader& reader);
|
||||
QString getNamingDescription();
|
||||
protected:
|
||||
QString terminalA;
|
||||
QString terminalB;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,13 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
|||
{
|
||||
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)
|
||||
{
|
||||
this->branch.push_back(fromTo);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "aclinesegment.h"
|
||||
#include "nodetoterminal.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#include "powertransformer.h"
|
||||
class TopologyRecorder
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue