inAtomicNumber_(false),
inExactMass_(false)
{
+ currentElementSymbol_ = "";
}
bool IsotopeParser::startElement(const QString&, const QString &localName, const QString&, const QXmlAttributes &attrs)
{
currentIsotope_ = new Isotope();
inIsotope_ = true;
+
+ //now save the symbol of the current element
+ for (int i = 0; i < attrs.length(); ++i)
+ {
+ if ( attrs.localName( i ) == "elementType" )
+ currentElementSymbol_ = attrs.value( i );
+ }
} else if (inIsotope_ && localName == "scalar")
{
for (int i = 0; i < attrs.length(); ++i)
{
if ( localName == "isotope" )
{
+ currentIsotope_->setParentSymbol( currentElementSymbol_ );
isotopes_.append(currentIsotope_);
currentIsotope_ = 0;
ChemicalDataObject::BlueObeliskUnit currentUnit_;
QVariant currentErrorValue_;
+
+ QString currentElementSymbol_;
Isotope* currentIsotope_;
QList<Isotope*> isotopes_;