libXpertMass Developer Documentation
  • libXpertMass
  • ModifProp
  • ModifProp Class

    class MsXpS::libXpertMass::ModifProp

    The ModifProp class provides a Prop instance of which the member data points to a dynamically allocated Modif instance. More...

    Header: #include <ModifProp>
    Inherits: MsXpS::libXpertMass::Prop

    Public Functions

    ModifProp(Modif *modif)
    ModifProp(const ModifProp &other)
    virtual ~ModifProp()
    ModifProp &operator=(const ModifProp &other)

    Reimplemented Public Functions

    virtual ModifProp *cloneOut() const override
    virtual void deleteData() override
    virtual QString *formatXmlElement(int offset, const QString &indent = QString(" ")) override
    virtual bool renderXmlElement(const QDomElement &element, int version) override

    Detailed Description

    The member datum m_name is set to "MODIF".

    Member Function Documentation

    ModifProp::ModifProp(Modif *modif)

    Constructs a ModifProp instance using modif.

    The modif pointer is set to the mpa_data member.

    ModifProp::ModifProp(const ModifProp &other)

    Constructs a ModifProp instance as a copy of other.

    [virtual noexcept] ModifProp::~ModifProp()

    Destructs this ModifProp instance.

    The deletion of the data are delegated to deleteData().

    [override virtual] ModifProp *ModifProp::cloneOut() const

    Duplicates this ModifProp instance and returns its pointer.

    [override virtual] void ModifProp::deleteData()

    Deletes the member data.

    [override virtual] QString *ModifProp::formatXmlElement(int offset, const QString &indent = QString(" "))

    Formats a string suitable to use as an XML element.

    Formats a string suitable to be used as an XML element in an XML file (a polymer sequence file, for example). Typical ModifProp elements that might be generated in this function look like this:

    <prop>
      <name>MODIF</name>
      <data>Phosphorylation</data> // That is the Modif name
      <data>-H+H2PO3</data>        // -------------------- formula
      <data>S;T;Y</data>           // -------------------- targets
    </prop>

    offset times the indent string must be used as a lead in the formatting of elements.

    Returns a dynamically allocated string that needs to be freed after use.

    [override virtual] bool ModifProp::renderXmlElement(const QDomElement &element, int version)

    Parses the property XML element using a versioned function.

    The element looks like this:

    <prop>
      <name>MODIF</name>
      <data>Phosphorylation</data> // That is the Modif name
      <data>-H+H2PO3</data>        // -------------------- formula
      <data>S;T;Y</data>           // -------------------- targets
    </prop>

    As the data in element are parsed they are set to the member data, thus essentially initializing the Modif object pointed to by the member data.

    Returns true if parsing was successful, false otherwise.

    ModifProp &ModifProp::operator=(const ModifProp &other)

    Assigns other to this ModifProp instance.

    The member data are first deleted and then set to a copy of those in other.