1/*******************************************************************
2 *
3 * Copyright (C) Andreas Wuest <AndreasWuest@gmx.de>
4 * Copyright (C) Stephan Kulow <coolo@kde.org>
5 * Copyright (C) 2006 Dmitry Suzdalev <dimsuz@gmail.com>
6 *
7 * This file is part of the KDE project "KAtomic"
8 *
9 * KAtomic is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * KAtomic is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with KAtomic; see the file COPYING. If not, write to
21 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 *
24 ********************************************************************/
25
26#include "molecule.h"
27
28const atom& Molecule::getAtom(int index) const
29{
30 static atom none = { 0, "" };
31
32 if (index > m_atoms.count() || index <= 0)
33 return none;
34
35 return m_atoms.at(index - 1);
36}
37
38