Isotope::Isotope()
: m_parentElementSymbol( 0 ), m_mass( 0 ), m_identifier( 0 ),
- m_spin( 0 ), m_magmoment( 0 ), m_halflife( 0 ), m_ecdecay( 0 ),
+ m_spin( 0 ), m_magmoment( 0 ), m_abundance( 0 ), m_halflife( 0 ), m_ecdecay( 0 ),
m_betaplus( 0 ), m_betaminus( 0 ), m_alpha( 0 )
{
}
m_spin = o;
else if ( o->type() == ChemicalDataObject::magneticMoment )
m_magmoment = o;
+ else if ( o->type() == ChemicalDataObject::relativeAbundance )
+ m_abundance = o;
else if ( o->type() == ChemicalDataObject::halfLife )
m_halflife = o;
return m_magmoment ? m_magmoment->value().toString() : QString();
}
+QString Isotope::abundance() const
+{
+ return m_abundance ? m_abundance->value().toString() : QString();
+}
+
double Isotope::halflife() const
{
return m_halflife ? m_halflife->value().toDouble() : -1.0;
QString magmoment() const;
+ QString abundance() const;
+
double halflife() const;
/**
*/
Isotope::Nucleons nucleonsAfterDecay( Decay kind );
+
private:
/**
* the symbol of the element the isotope belongs to
*/
ChemicalDataObject* m_magmoment;
+ /**
+ * stores the relative abundance of the Isotope
+ */
+ ChemicalDataObject* m_abundance; //added to test
+
/**
* stores the halfLife of the Isotope
*/