1 /****************************************************************************** 2 3 This source file is part of the Avogadro project. 4 5 Copyright 2013 Kitware, Inc. 6 7 This source code is released under the New BSD License, (the "License"). 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 15 ******************************************************************************/ 16 17 #include "nameatomtyper.h" 18 19 #include "atom.h" 20 #include "elements.h" 21 22 namespace Avogadro { 23 namespace Core { 24 NameAtomTyper(const Molecule * mol)25NameAtomTyper::NameAtomTyper(const Molecule* mol) : AtomTyper<std::string>(mol) 26 { 27 } 28 ~NameAtomTyper()29NameAtomTyper::~NameAtomTyper() 30 { 31 } 32 type(const Atom & atom)33std::string NameAtomTyper::type(const Atom& atom) 34 { 35 return std::string(Elements::name(atom.atomicNumber())); 36 } 37 38 } // namespace Core 39 } // namespace Avogadro 40