ProteoWizard
Public Types | Public Member Functions | Private Attributes | List of all members
pwiz::chemistry::Formula Class Reference

class to represent a chemical formula More...

#include <Chemistry.hpp>

Public Types

typedef std::map< Element::Type, int > Map
 

Public Member Functions

 Formula (const std::string &formula="")
 formula string given by symbol/count pairs, e.g. water: "H2 O1" (whitespace optional) More...
 
 Formula (const char *formula)
 
 Formula (const Formula &formula)
 
const Formulaoperator= (const Formula &formula)
 
 ~Formula ()
 
double monoisotopicMass () const
 
double molecularWeight () const
 
std::string formula () const
 
int operator[] (Element::Type e) const
 access to the Element's count in the formula More...
 
int & operator[] (Element::Type e)
 
Map data () const
 
Formulaoperator+= (const Formula &that)
 
Formulaoperator-= (const Formula &that)
 
Formulaoperator*= (int scalar)
 
bool operator== (const Formula &that) const
 formulas are equal iff their elemental compositions are equal More...
 
bool operator!= (const Formula &that) const
 

Private Attributes

boost::shared_ptr< Impl > impl_
 

Detailed Description

class to represent a chemical formula

Definition at line 133 of file Chemistry.hpp.

Member Typedef Documentation

§ Map

typedef std::map<Element::Type, int> pwiz::chemistry::Formula::Map

Definition at line 153 of file Chemistry.hpp.

Constructor & Destructor Documentation

§ Formula() [1/3]

pwiz::chemistry::Formula::Formula ( const std::string &  formula = "")

formula string given by symbol/count pairs, e.g. water: "H2 O1" (whitespace optional)

§ Formula() [2/3]

pwiz::chemistry::Formula::Formula ( const char *  formula)

§ Formula() [3/3]

pwiz::chemistry::Formula::Formula ( const Formula formula)

§ ~Formula()

pwiz::chemistry::Formula::~Formula ( )

Member Function Documentation

§ operator=()

const Formula& pwiz::chemistry::Formula::operator= ( const Formula formula)

§ monoisotopicMass()

double pwiz::chemistry::Formula::monoisotopicMass ( ) const

§ molecularWeight()

double pwiz::chemistry::Formula::molecularWeight ( ) const

§ formula()

std::string pwiz::chemistry::Formula::formula ( ) const

§ operator[]() [1/2]

int pwiz::chemistry::Formula::operator[] ( Element::Type  e) const

access to the Element's count in the formula

§ operator[]() [2/2]

int& pwiz::chemistry::Formula::operator[] ( Element::Type  e)

§ data()

Map pwiz::chemistry::Formula::data ( ) const

§ operator+=()

Formula& pwiz::chemistry::Formula::operator+= ( const Formula that)

§ operator-=()

Formula& pwiz::chemistry::Formula::operator-= ( const Formula that)

§ operator*=()

Formula& pwiz::chemistry::Formula::operator*= ( int  scalar)

§ operator==()

bool pwiz::chemistry::Formula::operator== ( const Formula that) const

formulas are equal iff their elemental compositions are equal

§ operator!=()

bool pwiz::chemistry::Formula::operator!= ( const Formula that) const

Member Data Documentation

§ impl_

boost::shared_ptr<Impl> pwiz::chemistry::Formula::impl_
private

Definition at line 166 of file Chemistry.hpp.


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