libXpertMass Developer Documentation

The property system

The property system developed in the context of the libmass library is aimed at easing the aggregation of typed data (integers, doubles, MsXpS::libXpertMass::Modifs, MsXpS::libXpertMass::ChemicalGroups...) to objects that derive from the MsXpS::libXpertMass::PropListHolder class.

The abstract base class is the MsXpS::libXpertMass::Prop class. The member data are the MsXpS::libXpertMass::Prop::m_name string and the MsXpS::libXpertMass::Prop::mpa_data pointer to void.

From that class, type-specific classes are derived where the member data are of that specific type. For example, the data in the MsXpS::libXpertMass::ModifProp class are of type MsXpS::libXpertMass::Modif.

The data in the Prop-derived instance are automatically deleted by the deleteData() function, like for MsXpS::libXpertMass::ModifProp.

Only the MsXpS::libXpertMass::NoDeletePointerProp Prop-derived class has as member data a pointer to data that are not deleted when the property instance is destructed.

MsXpS::libXpertMass::ChemicalGroupProp

Prop instance of which the member data points to a dynamically allocated ChemicalGroup instance

MsXpS::libXpertMass::DoubleProp

The specialized class for properties that hold data in the form of double values

MsXpS::libXpertMass::IntProp

The specialized class for properties that hold data in the form of integer values

MsXpS::libXpertMass::ModifProp

Prop instance of which the member data points to a dynamically allocated Modif instance

MsXpS::libXpertMass::NoDeletePointerProp

Pointer property

MsXpS::libXpertMass::Prop

The abstract base class for a number of specialized properties

MsXpS::libXpertMass::PropListHolder

The base class for a number of classes that need storing Prop instances

MsXpS::libXpertMass::StringProp

The specialized class for properties that hold data in the form of string objects