The Gnome Chemistry Utils 0.13.3
Public Member Functions | Public Attributes
gcu::FormulaBlock Class Reference

#include <formula.h>

Inheritance diagram for gcu::FormulaBlock:
gcu::FormulaElt

List of all members.

Public Member Functions

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

Public Attributes

std::list< FormulaElt * > children
int parenthesis

Detailed Description

class FormulaBlock gcu/formula.h Represents a sub formula delimited by a pair of matching brackets.

Definition at line 189 of file formula.h.


Constructor & Destructor Documentation

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

The destructor.


Member Function Documentation

void gcu::FormulaBlock::BuildRawFormula ( std::map< int, int > &  raw) [virtual]
Parameters:
rawwhere to put the result

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

Implements gcu::FormulaElt.

int gcu::FormulaBlock::GetValence ( ) [virtual]
Returns:
the (most probable) valence of the element.

Implements gcu::FormulaElt.

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

Reimplemented from gcu::FormulaElt.

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

Reimplemented from gcu::FormulaElt.


Member Data Documentation

The list of the formula elements delimited by the pair of brackets.

Definition at line 221 of file formula.h.

0 for "()", 1 for "[]" or 2 for "{}".

Definition at line 225 of file formula.h.


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