Logo Search packages:      
Sourcecode: massxpert version File versions

massXpert::Ionizable Class Reference

#include <ionizable.hpp>

Inheritance diagram for massXpert::Ionizable:

massXpert::PolChemDefEntity massXpert::Ponderable massXpert::Oligomer massXpert::Polymer

List of all members.


Detailed Description

The Ionizable class provides an ionizable Ponderable.

An ionizable is a Ponderable that might undergo ionization, using either its own member IonizeRule or an IonizerRule passed as argument to one of its functions. An Ionizable is also a PolChemDefEntity, as it has to know at each instant what polymer chemistry definition it is based upon. The ionization status of the Ionizable can be checked at each moment and a call to an ionizing function will first trigger deionization if the Ionizable is already ionized. The main members of the Ionizable class are the following:

Upon creation of an Ionizable(without use of the copy constructor), all the data required for the full qualification of the new instance should be passed to the constructor. Default parameters ensure that the Ionizable is set to a consistent status(that is its IonizeRule member is invalid and that its m_isIonized flag is false).

The caller is responsible for seeding correct and consistent values into the constructor for proper operation of the class instances.

For the ionization to be actually performed, and the masses to be effectively updated to account for that ionization, the Ionizable instance must be ionize()'d.

It is possible to deionize() an Ionizable instance as it is possible to reionize the instance with another IonizeRule, which will replace the member IonizeRule if the reionization succeeds. The deionize() call effects the state of the Ionizable instance only if the m_isIonized boolean is true.

Definition at line 91 of file ionizable.hpp.


Public Member Functions

virtual bool accountMasses (double *=0, double *=0, int=1) const
 Increments the masses in the arguments.
QString avg (const QLocale &, int=10) const
 Returns the average mass as a string.
double avg () const
 Returns the average mass.
virtual bool calculateMasses ()
 Calculates the masses of this Ionizable.
virtual int charge () const
 Returns the ionization charge of this Ionizable.
void clearMasses ()
 Clears the monoisotopic and average masses by setting both to 0.
virtual void clone (Ponderable *) const
 Modifies other to be identical to this.
virtual void clone (PolChemDefEntity *) const
 Modifies other to be identical to this.
virtual void clone (Ionizable *) const
 Modifies other to be identical to this.
virtual Ionizableclone () const
 Creates a new Ionizable.
void decrementAvg (double)
 Decrements the average mass by mass.
void decrementMono (double)
 Decrements the monoisotopic mass by mass.
virtual int deionize ()
 Deionizes this Ionizable.
void incrementAvg (double)
 Increments the average mass by mass.
void incrementMass (double, MassType)
void incrementMono (double)
 Increments the monoisotopic mass by mass.
 Ionizable (const Ionizable &)
 Constructs a copy of other.
 Ionizable (const PolChemDef *, const QString &=QString("NOT_SET"), const Ponderable &=Ponderable(), const IonizeRule &=IonizeRule(), bool=false)
 Constructs an Ionizable.
virtual int ionize (const IonizeRule &)
 Ionizes this Ionizable.
virtual int ionize ()
 Ionizes this Ionizable.
IonizeRuleionizeRule ()
 Returns the IonizeRule as a pointer.
const IonizeRuleionizeRule () const
 Returns the IonizeRule as a constant reference.
bool isIonized () const
 Returns the ionization status of this Ionizable.
double mass (MassType) const
void masses (double *=0, double *=0) const
 Updates the arguments with the monoisotopic and average masses.
virtual void mold (const Ponderable &)
 Modifies this to be identical to other.
virtual void mold (const PolChemDefEntity &)
 Modifies this to be identical to other.
virtual void mold (const Ionizable &)
 Modifies this to be identical to other.
virtual double molecularMass (MassType)
QString mono (const QLocale &, int=10) const
 Returns the monoisotopic mass as a string.
double mono () const
 Returns the monoisotopic mass.
QString name () const
 Returns the name.
virtual bool operator!= (const Ponderable &) const
 Inquality operator.
virtual bool operator!= (const PolChemDefEntity &) const
 Tests inequality.
virtual bool operator!= (const Ionizable &) const
virtual Ionizableoperator= (const Ionizable &)
 Assigns other to this Ionizable.
virtual bool operator== (const Ponderable &) const
 Equality operator.
virtual bool operator== (const PolChemDefEntity &) const
 Tests equality.
virtual bool operator== (const Ionizable &) const
const PolChemDefpolChemDef () const
 Returns the polymer chemistry definition.
double & ravg ()
 Returns a reference to the average mass.
double & rmono ()
 Returns a reference to the monoisotopic mass.
bool setAvg (const QString &, const QLocale &)
 Sets the average mass to mass.
void setAvg (double)
 Sets the average mass to mass.
int setCharge (int)
 Sets the charge of this Ionizable.
void setMass (double, MassType)
void setMasses (double, double)
 Sets the monoisotopic and average masses.
bool setMono (const QString &, const QLocale &)
 Sets the monoisotopic mass to mass.
void setMono (double)
 Sets the monoisotopic mass to mass.
void setName (const QString &)
 Sets the name.
void setPolChemDef (PolChemDef *)
virtual bool validate () const
bool validate ()
virtual ~Ionizable ()
 Destroys this Ionizable.

Static Public Member Functions

static int deionize (Ionizable *)
static int ionize (Ionizable *, const IonizeRule &)
 Ionizes ionizable.

Protected Attributes

double m_avg
 Average mass.
IonizeRule m_ionizeRule
 IonizeRule that is used to ionize this Ionizable.
bool m_isIonized
 Indicates if this Ionizable has been effectively ionized.
double m_mono
 Monoisotopic mass.
QString m_name
 Name.
const PolChemDefmp_polChemDef
 Pointer to the reference polymer chemistry definition.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index