Diffstat (limited to 'noncore/apps/oxygen/kmolelements.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/kmolelements.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/noncore/apps/oxygen/kmolelements.cpp b/noncore/apps/oxygen/kmolelements.cpp index ce8f9c1..e76461b 100644 --- a/noncore/apps/oxygen/kmolelements.cpp +++ b/noncore/apps/oxygen/kmolelements.cpp | |||
@@ -10,6 +10,6 @@ | |||
10 | #include <stdio.h> | 10 | #include <stdio.h> |
11 | #include "kmolelements.h" | 11 | #include "kmolelements.h" |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * A generic chemical entity. Can be an element or a group. | 14 | * A generic chemical entity. Can be an element or a group. |
15 | */ | 15 | */ |
@@ -20,3 +20,3 @@ SubUnit::~SubUnit () {} | |||
20 | /** | 20 | /** |
21 | * Construct a subunit and return a pointer to it. The syntax of LINE is | 21 | * Construct a subunit and return a pointer to it. The syntax of LINE is |
22 | * the one used in the element definition file. | 22 | * the one used in the element definition file. |
@@ -30,3 +30,3 @@ SubUnit* SubUnit::makeSubUnit(QString line) { | |||
30 | return new Element(name, weight.toDouble()); | 30 | return new Element(name, weight.toDouble()); |
31 | } | 31 | } |
32 | else { | 32 | else { |
@@ -50,3 +50,3 @@ QString SubUnit::getName() const { | |||
50 | */ | 50 | */ |
51 | double SubUnit::getWeight(QDict<SubUnit>* elstable) const { | 51 | double SubUnit::getWeight(QDict<SubUnit>* ) const { |
52 | return -1; | 52 | return -1; |
@@ -55,3 +55,3 @@ double SubUnit::getWeight(QDict<SubUnit>* elstable) const { | |||
55 | /** | 55 | /** |
56 | * A group of elements. | 56 | * A group of elements. |
57 | */ | 57 | */ |
@@ -67,3 +67,3 @@ ElementList::~ElementList () { | |||
67 | /** | 67 | /** |
68 | * A group of elements. | 68 | * A group of elements. |
69 | */ | 69 | */ |
@@ -82,3 +82,3 @@ void ElementList::writeOut(QString& line) { | |||
82 | while (current != 0) { | 82 | while (current != 0) { |
83 | line += " " + current->name + " " + coef.setNum(current->coef, 'g', 10); | 83 | line += " " + current->name + " " + coef.setNum(current->coef, 'g', 10); |
84 | // precision set to 10 digits | 84 | // precision set to 10 digits |
@@ -105,3 +105,3 @@ double ElementList::getWeight(QDict<SubUnit>* elstable) const { | |||
105 | /** | 105 | /** |
106 | * Return a string representing the elemental composition of THIS, as | 106 | * Return a string representing the elemental composition of THIS, as |
107 | * a tab-separated element - percentage pairs, separated by newlines. | 107 | * a tab-separated element - percentage pairs, separated by newlines. |
@@ -116,6 +116,6 @@ QString ElementList::getEA(QDict<SubUnit>* elstable, double mw) const { | |||
116 | if (e != 0) { | 116 | if (e != 0) { |
117 | double current_percent = 100 * (current->coef) * | 117 | double current_percent = 100 * (current->coef) * |
118 | (e->getWeight(elstable)) | 118 | (e->getWeight(elstable)) |
119 | / mw; | 119 | / mw; |
120 | ea += current->name + "\t" + | 120 | ea += current->name + "\t" + |
121 | temp.setNum(current_percent) + "\n"; | 121 | temp.setNum(current_percent) + "\n"; |
@@ -126,3 +126,3 @@ QString ElementList::getEA(QDict<SubUnit>* elstable, double mw) const { | |||
126 | } | 126 | } |
127 | 127 | ||
128 | /** | 128 | /** |
@@ -164,3 +164,3 @@ void ElementList::addTo(ElementList& els, double coef) { | |||
164 | /** | 164 | /** |
165 | * Add an element to THIS, with a coefficient COEF. If THIS already contains | 165 | * Add an element to THIS, with a coefficient COEF. If THIS already contains |
166 | * an element with the same name, adjust its coefficient only; if not, create | 166 | * an element with the same name, adjust its coefficient only; if not, create |
@@ -186,3 +186,3 @@ bool ElementList::contains(const QString& name) { | |||
186 | while (current != 0) { | 186 | while (current != 0) { |
187 | if (current->name == name) | 187 | if (current->name == name) |
188 | return true; | 188 | return true; |
@@ -204,3 +204,3 @@ QString ElementList::getName() const { | |||
204 | */ | 204 | */ |
205 | Element::Element(const QString& n, double w) | 205 | Element::Element(const QString& n, double w) |
206 | : weight(w), name(n) { } | 206 | : weight(w), name(n) { } |
@@ -220,3 +220,3 @@ void Element::writeOut(QString& line) { | |||
220 | 220 | ||
221 | double Element::getWeight(QDict<SubUnit>* elstable) const { | 221 | double Element::getWeight(QDict<SubUnit>* ) const { |
222 | return weight; | 222 | return weight; |
@@ -233,3 +233,3 @@ QString Element::getName() const { | |||
233 | /** | 233 | /** |
234 | * An element - coefficient pair. Used to represent elements within an | 234 | * An element - coefficient pair. Used to represent elements within an |
235 | * element list. | 235 | * element list. |