cimforreduceloss/testHasttable/busbarsection.cpp

33 lines
979 B
C++

#include "busbarsection.h"
#include <iostream>
BusbarSection::BusbarSection(QObject *parent):BasicElementInfo(parent)
{
}
bool BusbarSection::derivedParse(QXmlStreamReader& reader)
{
// std::cout<<reader.name().toString().toStdString()<<std::endl;
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";
// std::cout<<"ConductingEquipment.Terminals"<<this->terminal.toStdString()<<std::endl;
}
return true;
}
QString BusbarSection::getTerminal()
{
return this->terminal;
}
bool BusbarSection::parse(QXmlStreamReader& reader)
{
// std::cout<<"BusbarSection"<<std::endl;
return this->parseBasicInfo(reader);
}