The Gnome Chemistry Utils  0.14.0
Public Member Functions | Public Attributes | List of all members
gcu::FormulaElt Class Reference

#include <formula.h>

Inheritance diagram for gcu::FormulaElt:
gcu::FormulaAtom gcu::FormulaBlock gcu::FormulaResidue

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
rawwhere to put the result

Adds the number of atoms of each element to the map taking the stoichiometry coefficient into account.

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

virtual int gcu::FormulaElt::GetValence ( )
pure virtual
Returns
the (most probable) valence of the element.

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

virtual std::string gcu::FormulaElt::Markup ( )
virtual
Returns
the string representation of the element as a markup.

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

virtual std::string gcu::FormulaElt::Text ( )
virtual
Returns
the string representation of the element as raw text.

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

Member Data Documentation

unsigned gcu::FormulaElt::end

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

Definition at line 144 of file formula.h.

unsigned gcu::FormulaElt::start

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

Definition at line 140 of file formula.h.

int gcu::FormulaElt::stoich

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: