gcu::FormulaElt Class Reference

#include <formula.h>

Inheritance diagram for gcu::FormulaElt:

gcu::FormulaAtom gcu::FormulaBlock gcu::FormulaResidue

List of all members.

Public Member Functions

 FormulaElt ()
virtual ~FormulaElt ()
virtual std::string Markup ()
virtual std::string Text ()
virtual void BuildRawFormula (std::map< int, int > &raw)=0
virtual int GetValence ()=0

Public Attributes

int stoich
unsigned start
unsigned end


Detailed Description

class FormulaElt gcu/formula.h Bas class for elements found in a formula.

Definition at line 103 of file formula.h.


Constructor & Destructor Documentation

gcu::FormulaElt::FormulaElt (  ) 

The constructor.

virtual gcu::FormulaElt::~FormulaElt (  )  [virtual]

The destructor.


Member Function Documentation

virtual void gcu::FormulaElt::BuildRawFormula ( std::map< int, int > &  raw  )  [pure virtual]

Parameters:
raw where to put the result
Adds the number of atoms of each element to the map taking the stoichiometry coefficient into account.

Implemented in gcu::FormulaAtom, gcu::FormulaBlock, and gcu::FormulaResidue.

virtual int gcu::FormulaElt::GetValence (  )  [pure virtual]

Returns:
the (most probable) valence of the element.

Implemented in gcu::FormulaAtom, gcu::FormulaBlock, and gcu::FormulaResidue.

virtual std::string gcu::FormulaElt::Markup (  )  [virtual]

Returns:
the string representation of the element as a markup.

Reimplemented in gcu::FormulaAtom, gcu::FormulaBlock, and gcu::FormulaResidue.

virtual std::string gcu::FormulaElt::Text (  )  [virtual]

Returns:
the string representation of the element as raw text.

Reimplemented in gcu::FormulaAtom, gcu::FormulaBlock, and gcu::FormulaResidue.


Member Data Documentation

The end index in bytes of the element in the formula input string.

Definition at line 144 of file formula.h.

The start index in bytes of the element in the formula input string.

Definition at line 140 of file formula.h.

The stoichiometry coefficient associated with he element.

Definition at line 136 of file formula.h.


The documentation for this class was generated from the following file:

Generated on Fri Sep 24 15:58:47 2010 for The Gnome Chemistry Utils by  doxygen 1.5.9