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

#include <formula.h>

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

Public Member Functions

virtual ~FormulaBlock ()
std::string Markup ()
std::string Text ()
void BuildRawFormula (std::map< int, int > &raw)
int GetValence ()
- Public Member Functions inherited from gcu::FormulaElt
 FormulaElt ()
virtual ~FormulaElt ()

Public Attributes

std::list< FormulaElt * > children
int parenthesis
- Public Attributes inherited from gcu::FormulaElt
int stoich
unsigned start
unsigned end

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

std::list<FormulaElt *> gcu::FormulaBlock::children

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

Definition at line 221 of file formula.h.

int gcu::FormulaBlock::parenthesis

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: