libXpertMass Developer Documentation
  • libXpertMass
  • CrossLinkerSpec
  • CrossLinkerSpec Class

    class MsXpS::libXpertMass::CrossLinkerSpec

    The CrossLinkerSpec class provides the specification about how CrossLinker objects are represented. More...

    Header: #include <CrossLinkerSpec.hpp>

    Public Functions

    CrossLinkerSpec()
    ~CrossLinkerSpec()
    void setName(const QString &name)
    void setSound(const QString &sound)
    void setVector(const QString &vector)
    const QString &sound()
    const QString &vector()

    Static Public Members

    bool parseFile(QString &file_path, QList<CrossLinkerSpec *> *cross_linker_spec_list)

    Protected Variables

    QString m_name
    QString m_sound
    QString m_vector

    Detailed Description

    The CrossLinkerSpec class specifies how a CrossLinker object is represented graphically, mainly by connecting its name to a graphics SVG file that is located in the Polymer chemistry definition directory. That connection is performed in the "cross_linker_dictionary" dictionary file itself also located in the polymer chemistry definition directory. Its contents look like this:

    DisulfideBond%disulfidebond-cross-link.svg
    CFP-chromophore%cfp-chromophore.svg

    The DisulfideBond%disulfidebond-cross-link.svg line indicates that, when a CrossLinker object by name "DisulfideBond" is to be rendered graphically, the corresponding vignette to be used is in the file named "disulfidebond-cross-link.svg" in the polymer chemistry definition directory.

    Member Function Documentation

    CrossLinkerSpec::CrossLinkerSpec()

    Constructs a CrossLinkerSpec instance.

    [noexcept] CrossLinkerSpec::~CrossLinkerSpec()

    Destructs this CrossLinkerSpec instance.

    [static] bool CrossLinkerSpec::parseFile(QString &file_path, QList<CrossLinkerSpec *> *cross_linker_spec_list)

    Parses the file_path dictionary containing the CrossLinker specifications.

    At the moment the file has this format:

    DisulfideBond%disulfidebond-cross-link.svg
    CFP-chromophore%cfp-chromophore.svg

    Upon parsing, the cross_linker_spec_list of CrossLinkerSpec instances will be filled with instances created on the basis of each parsed line in the file.

    Returns true if the parsing was successful, false otherwise.

    void CrossLinkerSpec::setName(const QString &name)

    Sets the cross-linker name.

    void CrossLinkerSpec::setSound(const QString &sound)

    Sets the file name of the CrossLinkerSpec's sound file.

    See also sound().

    void CrossLinkerSpec::setVector(const QString &vector)

    Sets the vector image file name to vector.

    See also vector().

    const QString &CrossLinkerSpec::sound()

    Returns the file name of the CrossLinkerSpec's sound file.

    See also setSound().

    const QString &CrossLinkerSpec::vector()

    Returns the vector image file name.

    See also setVector().

    Member Variable Documentation

    QString CrossLinkerSpec::m_name

    This variable holds the name of the cross-linker.

    QString CrossLinkerSpec::m_sound

    This variable holds the file name of the sound for the cross-linker.

    QString CrossLinkerSpec::m_vector

    This variable holds the filename of the vector representation of the cross-linker.