***************************************************************************/
#include "chemicaldataobject.h"
+int ChemicalDataObject::mycount = 0;
+
#include <kdebug.h>
class ChemicalDataObjectPrivate
ChemicalDataObject::ChemicalDataObject( const QVariant& v, BlueObelisk type, const QVariant& errorValue )
: d(new ChemicalDataObjectPrivate())
{
+ mycount++;
+ kDebug() << "CDO non-default contructor. There are now " << mycount
+ << " allocated CDOs" << endl;
+
d->m_value = v;
d->m_errorValue = errorValue;
d->m_type = type;
ChemicalDataObject::ChemicalDataObject() : d(new ChemicalDataObjectPrivate())
{
- d->m_value = QVariant();
+ mycount++;
+ kDebug() << "CDO default contructor. There are now " << mycount
+ << " allocated CDOs" << endl; d->m_value = QVariant();
d->m_errorValue = QVariant();
d->m_unit = ChemicalDataObject::noUnit;
}
ChemicalDataObject::~ChemicalDataObject()
{
- delete d;
+ mycount--;
+ kDebug() << "CDO destructor. There are now " << mycount
+ << " allocated CDOs" << endl; delete d;
}
QString ChemicalDataObject::valueAsString() const