|
The MonomerSpec class provides the specification about how Monomer objects are represented. More...
Header: | #include <MonomerSpec.hpp> |
MonomerSpec() | |
virtual | ~MonomerSpec() |
const QString & | code() |
const QString & | codeSound() |
const QString & | name() |
const QString & | nameSound() |
const QString & | raster() |
void | setCode(const QString &code) |
void | setCodeSound(const QString &sound) |
void | setName(const QString &name) |
void | setNameSound(const QString &sound) |
void | setRaster(const QString &raster) |
void | setVector(const QString &vector) |
const QString & | vector() |
bool | parseFile(QString &file_path, QList<MonomerSpec *> *monomer_spec_list) |
QString | m_code |
QString | m_codeSound |
QString | m_name |
QString | m_nameSound |
QString | m_raster |
QString | m_vector |
The MonomerSpec class specifies how a Monomer object is represented graphically, mainly by connecting its monomer code to a graphics SVG file that is located in the Polymer chemistry definition directory. That connection is performed in the "monomer_dictionary" dictionary file itself also located in the polymer chemistry definition directory. Its contents look like this:
A%alanine.svg C%cysteine.svg D%aspartate.svg E%glutamate.svg F%phenylalanine.svg G%glycine.svg H%histidine.svg"
The A%alanine.svg
line indicates that, when a Monomer object by code 'A' is to be rendered graphically, the corresponding vignette to be used is in the file named "alanine.svg" in the polymer chemistry definition directory.
Constructs a MonomerSpec instance.
[virtual noexcept]
MonomerSpec::~MonomerSpec()Destructs this MonomerSpec instance.
Returns the monomer code.
See also setCode().
Returns the file name of the Monomer's code sound file.
See also setCodeSound().
Returns the monomer name.
See also setName().
Returns the file name of the Monomer's name sound file.
See also setNameSound().
[static]
bool MonomerSpec::parseFile(QString &file_path, QList<MonomerSpec *> *monomer_spec_list)Parses the file_path dictionary containing the Monomer specifications.
At the moment the file has this format:
A%alanine.svg C%cysteine.svg D%aspartate.svg E%glutamate.svg
Upon parsing, the monomer_spec_list of MonomerSpec 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.
Returns the raster image file name.
See also setRaster().
Sets the monomer code.
See also code().
Sets the file name of the Monomer's code sound file.
See also codeSound().
Sets the monomer name.
See also name().
Sets the file name of the Monomer's name sound file.
See also nameSound().
Sets the raster image file name to raster.
See also raster().
Sets the vector image file name to vector.
See also vector().
Returns the vector image file name.
See also setVector().
This variable holds the code of the monomer.
This variable holds the file name of the sound for the code of the monomer.
This variable holds the name of the monomer.
This variable holds the file name of the sound for the name of the monomer.
This variable holds the file name of the raster representation of the monomer.
This variable holds the filename of the vector representation of the monomer.