kalzium/libscience
Go to the documentation of this file.
14 #ifndef MOLECULEPARSER_H
15 #define MOLECULEPARSER_H
22 #include <QtCore/QMap>
23 #include <QtCore/QList>
63 int count()
const {
return m_count; }
69 void add(
int _count) { m_count += _count; }
70 void multiply(
int _factor) { m_count *= _factor; }
126 QList<Element*> elements();
132 void add(
Element *_element,
int _count);
137 void multiply(
int _factor);
139 QList<ElementCount*>
map(){
144 QList<ElementCount*> m_map;
214 bool weight(
const QString& _moleculeString,
218 QSet<QString> aliasList();
221 bool parseSubmolecule(
double *_resultMass,
223 bool parseTerm(
double *_resultMass,
227 QString expandFormula(
const QString& _shortMolecularMass);
230 QString expandTerm(
const QString& _group);
232 QList<Element*> m_elementList;
234 static const int ELEMENT_TOKEN = 300;
236 Element *lookupElement(
const QString& _name );
238 QMap<Element*, int> m_elementMap;
241 QSet<QString> *m_aliasList;
void clear()
Clear the map of ElementCount pointers.
Element * element() const
void add(int _count)
Add _count occurrences of the Element.
Element * m_element
The Element of the object.
int m_count
The number of occurrences.
void multiply(int _factor)
In this class all information about an element are stored.
QList< ElementCount * > map()
ElementCount(Element *_element, int _count)
Constructor.
This class is used to count the elements in the molecule which is being calculated.
virtual int getNextToken()
Fetches the next token.
ElementCount(Element *_element)
Constructor.
This is a general purpose parser originally written by Inge Wallin.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:31 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.