00001 // -*- mode: c++; indent-tabs-mode: nil; -*- 00002 // 00003 //The Biomolecule Toolkit (BTK) is a C++ library for use in the 00004 //modeling, analysis, and design of biological macromolecules. 00005 //Copyright (C) 2006, Tim Robertson <kid50@users.sourceforge.net> 00006 // 00007 //This program is free software; you can redistribute it and/or modify 00008 //it under the terms of the GNU Lesser General Public License as published 00009 //by the Free Software Foundation; either version 2.1 of the License, or (at 00010 //your option) any later version. 00011 // 00012 //This program is distributed in the hope that it will be useful, but 00013 //WITHOUT ANY WARRANTY; without even the implied warranty of 00014 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 //Lesser General Public License for more details. 00016 // 00017 //You should have received a copy of the GNU Lesser General Public License 00018 //along with this program; if not, write to the Free Software Foundation, 00019 //Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 00023 00024 #ifndef BTK_ELEMENTS_ELEMENT_TYPES_HPP 00025 #define BTK_ELEMENTS_ELEMENT_TYPES_HPP 00026 00027 #include <btk/core/utility/type_id.hpp> 00028 #include <btk/core/utility/type_id_traits.hpp> 00029 00030 namespace BTK { 00031 namespace ELEMENTS { 00032 00040 class ElementType : 00041 public BTK::UTILITY::TypeID<ElementType> 00042 { 00043 typedef BTK::UTILITY::TypeID<ElementType> base_type; 00044 00045 public: 00046 ElementType() : base_type(unknown()) {} 00047 00048 static const ElementType unknown() { return ElementType(-1); } 00049 00050 static const ElementType H() { return ElementType(0); } 00051 static const ElementType He() { return ElementType(1); } 00052 00053 static const ElementType Li() { return ElementType(2); } 00054 static const ElementType Be() { return ElementType(3); } 00055 static const ElementType B() { return ElementType(4); } 00056 static const ElementType C() { return ElementType(5); } 00057 static const ElementType N() { return ElementType(6); } 00058 static const ElementType O() { return ElementType(7); } 00059 static const ElementType F() { return ElementType(8); } 00060 static const ElementType Ne() { return ElementType(9); } 00061 00062 static const ElementType Na() { return ElementType(10); } 00063 static const ElementType Mg() { return ElementType(11); } 00064 static const ElementType Al() { return ElementType(12); } 00065 static const ElementType Si() { return ElementType(13); } 00066 static const ElementType P() { return ElementType(14); } 00067 static const ElementType S() { return ElementType(15); } 00068 static const ElementType Cl() { return ElementType(16); } 00069 static const ElementType Ar() { return ElementType(17); } 00070 00071 static const ElementType K() { return ElementType(18); } 00072 static const ElementType Ca() { return ElementType(19); } 00073 static const ElementType Sc() { return ElementType(20); } 00074 static const ElementType Ti() { return ElementType(21); } 00075 static const ElementType V() { return ElementType(22); } 00076 static const ElementType Cr() { return ElementType(23); } 00077 static const ElementType Mn() { return ElementType(24); } 00078 static const ElementType Fe() { return ElementType(25); } 00079 static const ElementType Co() { return ElementType(26); } 00080 static const ElementType Ni() { return ElementType(27); } 00081 static const ElementType Cu() { return ElementType(28); } 00082 static const ElementType Zn() { return ElementType(29); } 00083 static const ElementType Ga() { return ElementType(30); } 00084 static const ElementType Ge() { return ElementType(31); } 00085 static const ElementType As() { return ElementType(32); } 00086 static const ElementType Se() { return ElementType(33); } 00087 static const ElementType Br() { return ElementType(34); } 00088 static const ElementType Kr() { return ElementType(35); } 00089 static const ElementType Rb() { return ElementType(36); } 00090 static const ElementType Sr() { return ElementType(37); } 00091 static const ElementType Y() { return ElementType(38); } 00092 static const ElementType Zr() { return ElementType(39); } 00093 static const ElementType Nb() { return ElementType(40); } 00094 static const ElementType Mo() { return ElementType(41); } 00095 static const ElementType Tc() { return ElementType(42); } 00096 static const ElementType Ru() { return ElementType(43); } 00097 static const ElementType Rh() { return ElementType(44); } 00098 static const ElementType Pd() { return ElementType(45); } 00099 static const ElementType Ag() { return ElementType(46); } 00100 static const ElementType Cd() { return ElementType(47); } 00101 static const ElementType In() { return ElementType(48); } 00102 static const ElementType Sn() { return ElementType(49); } 00103 static const ElementType Sb() { return ElementType(50); } 00104 static const ElementType Te() { return ElementType(51); } 00105 static const ElementType I() { return ElementType(52); } 00106 static const ElementType Xe() { return ElementType(53); } 00107 00108 static const ElementType Cs() { return ElementType(54); } 00109 static const ElementType Ba() { return ElementType(55); } 00110 static const ElementType La() { return ElementType(56); } 00111 00112 static const ElementType Ce() { return ElementType(57); } 00113 static const ElementType Pr() { return ElementType(58); } 00114 static const ElementType Nd() { return ElementType(59); } 00115 static const ElementType Pm() { return ElementType(60); } 00116 static const ElementType Sm() { return ElementType(61); } 00117 static const ElementType Eu() { return ElementType(62); } 00118 static const ElementType Gd() { return ElementType(63); } 00119 static const ElementType Tb() { return ElementType(64); } 00120 static const ElementType Dy() { return ElementType(65); } 00121 static const ElementType Ho() { return ElementType(66); } 00122 static const ElementType Er() { return ElementType(67); } 00123 static const ElementType Tm() { return ElementType(68); } 00124 static const ElementType Yb() { return ElementType(69); } 00125 static const ElementType Lu() { return ElementType(70); } 00126 00127 static const ElementType Hf() { return ElementType(71); } 00128 static const ElementType Ta() { return ElementType(72); } 00129 static const ElementType W() { return ElementType(73); } 00130 static const ElementType Re() { return ElementType(74); } 00131 static const ElementType Os() { return ElementType(75); } 00132 static const ElementType Ir() { return ElementType(76); } 00133 static const ElementType Pt() { return ElementType(77); } 00134 static const ElementType Au() { return ElementType(78); } 00135 static const ElementType Hg() { return ElementType(79); } 00136 static const ElementType Tl() { return ElementType(80); } 00137 static const ElementType Pb() { return ElementType(81); } 00138 static const ElementType Bi() { return ElementType(82); } 00139 static const ElementType Po() { return ElementType(83); } 00140 static const ElementType At() { return ElementType(84); } 00141 static const ElementType Rn() { return ElementType(85); } 00142 00143 static const ElementType Fr() { return ElementType(86); } 00144 static const ElementType Ra() { return ElementType(87); } 00145 static const ElementType Ac() { return ElementType(88); } 00146 00147 static const ElementType Th() { return ElementType(89); } 00148 static const ElementType Pa() { return ElementType(90); } 00149 static const ElementType U() { return ElementType(91); } 00150 static const ElementType Np() { return ElementType(92); } 00151 static const ElementType Pu() { return ElementType(93); } 00152 static const ElementType Am() { return ElementType(94); } 00153 static const ElementType Cm() { return ElementType(95); } 00154 static const ElementType Bk() { return ElementType(96); } 00155 static const ElementType Cf() { return ElementType(97); } 00156 static const ElementType Es() { return ElementType(98); } 00157 static const ElementType Fm() { return ElementType(99); } 00158 static const ElementType Md() { return ElementType(100); } 00159 static const ElementType No() { return ElementType(101); } 00160 static const ElementType Lr() { return ElementType(102); } 00161 00162 static const ElementType Rf() { return ElementType(103); } 00163 static const ElementType Db() { return ElementType(104); } 00164 static const ElementType Sg() { return ElementType(105); } 00165 static const ElementType Bh() { return ElementType(106); } 00166 static const ElementType Hs() { return ElementType(107); } 00167 static const ElementType Mt() { return ElementType(108); } 00168 static const ElementType Ds() { return ElementType(109); } 00169 static const ElementType Rg() { return ElementType(110); } 00170 00171 private: 00172 ElementType(int t) : base_type(t) {} 00173 }; 00174 00175 } // namespace ELEMENTS 00176 00177 namespace UTILITY { 00178 00181 template <> 00182 struct TypeIDTraits<BTK::ELEMENTS::ElementType> 00183 { 00184 static const bool dynamic = false; 00185 00186 static BTK::ELEMENTS::ElementType first() 00187 { return BTK::ELEMENTS::ElementType::H(); } 00188 static BTK::ELEMENTS::ElementType last() 00189 { return BTK::ELEMENTS::ElementType::Rg(); } 00190 static BTK::ELEMENTS::ElementType unknown() 00191 { return BTK::ELEMENTS::ElementType::unknown(); } 00192 00193 static BTK::ELEMENTS::ElementType next(BTK::ELEMENTS::ElementType id) 00194 { return unknown(); } 00195 }; 00196 00197 } // namespace UTILITY 00198 } // namespace BTK 00199 00200 #endif