00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // -------------------------------------------------------------------------- 00005 // OpenMS Mass Spectrometry Framework 00006 // -------------------------------------------------------------------------- 00007 // Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert 00008 // 00009 // This library is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU Lesser General Public 00011 // License as published by the Free Software Foundation; either 00012 // version 2.1 of the License, or (at your option) any later version. 00013 // 00014 // This library is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // Lesser General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU Lesser General Public 00020 // License along with this library; if not, write to the Free Software 00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 // 00023 // -------------------------------------------------------------------------- 00024 // $Maintainer: Andreas Bertsch $ 00025 // -------------------------------------------------------------------------- 00026 // 00027 00028 #ifndef OPENMS_CHEMISTRY_ELEMENT_H 00029 #define OPENMS_CHEMISTRY_ELEMENT_H 00030 00031 #include <OpenMS/CONCEPT/Types.h> 00032 #include <OpenMS/DATASTRUCTURES/String.h> 00033 #include <OpenMS/CHEMISTRY/IsotopeDistribution.h> 00034 00035 #define OPENMS_CHEMISTRY_ELEMENT_NAME_DEFAULT "unknown" 00036 #define OPENMS_CHEMISTRY_ELEMENT_SYMBOL_DEFAULT "??" 00037 #define OPENMS_CHEMISTRY_ELEMENT_WEIGHT_DEFAULT 0.0 00038 #define OPENMS_CHEMISTRY_ELEMENT_ATOMICNUMBER_DEFAULT 0 00039 00040 namespace OpenMS 00041 { 00046 class Element 00047 { 00048 public: 00049 00053 00054 Element(); 00055 00057 Element(const Element& element); 00058 00060 Element(const String& name, 00061 const String& symbol, 00062 UInt atomic_number, 00063 DoubleReal average_weight, 00064 DoubleReal mono_weight, 00065 const IsotopeDistribution& isotopes); 00066 00068 virtual ~Element(); 00070 00074 00075 void setAtomicNumber(UInt atomic_number); 00076 00078 UInt getAtomicNumber() const; 00079 00081 void setAverageWeight(DoubleReal weight); 00082 00084 DoubleReal getAverageWeight() const; 00085 00087 void setMonoWeight(DoubleReal weight); 00088 00090 DoubleReal getMonoWeight() const; 00091 00093 void setIsotopeDistribution(const IsotopeDistribution& isotopes); 00094 00096 const IsotopeDistribution& getIsotopeDistribution() const; 00097 00099 void setName(const String& name); 00100 00102 const String& getName() const; 00103 00105 void setSymbol(const String& symbol); 00106 00108 const String& getSymbol() const; 00110 00114 00115 Element& operator = (const Element& element); 00117 00121 00122 bool operator == (const Element& element) const; 00123 00125 bool operator != (const Element& element) const; 00127 00129 friend std::ostream& operator << (std::ostream& os, const Element& element); 00130 00131 protected: 00132 00134 String name_; 00135 00137 String symbol_; 00138 00140 UInt atomic_number_; 00141 00143 DoubleReal average_weight_; 00144 00146 DoubleReal mono_weight_; 00147 00149 IsotopeDistribution isotopes_; 00150 }; 00151 00152 std::ostream& operator << (std::ostream&, const Element&); 00153 00154 } // namespace OpenMS 00155 00156 #endif 00157
Generated Tue Apr 1 15:36:34 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |