#include <gcu/formula.h>
Public Member Functions | |
Formula (string entry) throw (parse_error) | |
char const * | GetMarkup () |
map< int, int > & | GetRawFormula () |
char const * | GetRawMarkup () |
void | SetFormula (string entry) throw (parse_error) |
void | Clear () |
double | GetMolecularWeight (int &prec, bool &artificial) |
void | CalculateIsotopicPattern (IsotopicPattern &pattern) |
Definition at line 83 of file formula.h.
gcu::Formula::Formula | ( | string | entry | ) | throw (parse_error) |
entry,: | the formula to parse as a string. The constructor will emit a parse_error exception. if it cannot parse the given formula. |
void gcu::Formula::CalculateIsotopicPattern | ( | IsotopicPattern & | pattern | ) |
pattern,: | the IsotopicPattern to be filled This method evaluates the isotopic pattern and fills the pattern parameter with the calculated data. |
void gcu::Formula::Clear | ( | ) |
Clears all data.
char const* gcu::Formula::GetMarkup | ( | ) |
double gcu::Formula::GetMolecularWeight | ( | int & | prec, | |
bool & | artificial | |||
) |
prec,: | will be filled with the precision (number of significative decimal figures). | |
artificial,: | will be true if the formula contains an artificial element (with no natural isotope). |
map<int,int>& gcu::Formula::GetRawFormula | ( | ) |
char const* gcu::Formula::GetRawMarkup | ( | ) |
void gcu::Formula::SetFormula | ( | string | entry | ) | throw (parse_error) |
entry,: | the formula to parse as a string. Calls Formula::Clear before parsing the new formula. The method will emit a parse_error exception if it cannot parse the given formula. |