cimforreduceloss/testHasttable/busbarsection.cpp

26 lines
747 B
C++

#include "busbarsection.h"
#include <iostream>
BusbarSection::BusbarSection(QObject *parent):BasicElementInfo(parent)
{
}
bool BusbarSection::derivedParse(QXmlStreamReader& reader)
{
if("ConductingEquipment.Terminals"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
{
QString terminal;
terminal=reader.attributes().value("rdf:resource").toString();
this->terminal=terminal.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminal<<"\n";
}
return true;
}
bool BusbarSection::parse(QXmlStreamReader& reader)
{
// std::cout<<"BusbarSection"<<std::endl;
return this->parseBasicInfo(reader);
}