Chemical Data Processing Library C++ API - Version 1.1.1
MMFF94HeavyToHydrogenAtomTypeMap.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94HeavyToHydrogenAtomTypeMap.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_FORCEFIELD_MMFF94HEAVYTOHYDROGENATOMTYPEMAP_HPP
30 #define CDPL_FORCEFIELD_MMFF94HEAVYTOHYDROGENATOMTYPEMAP_HPP
31 
32 #include <string>
33 #include <iosfwd>
34 #include <cstddef>
35 #include <unordered_map>
36 #include <memory>
37 
39 
40 
41 namespace CDPL
42 {
43 
44  namespace ForceField
45  {
46 
48  {
49 
50  typedef std::unordered_map<std::string, std::string> DataStorage;
51 
52  public:
53  typedef std::shared_ptr<MMFF94HeavyToHydrogenAtomTypeMap> SharedPointer;
54 
55  typedef DataStorage::const_iterator ConstEntryIterator;
56  typedef DataStorage::iterator EntryIterator;
57  typedef DataStorage::value_type Entry;
58 
60 
61  void addEntry(const std::string& parent_type, const std::string& hyd_type);
62 
63  const std::string& getEntry(const std::string& parent_type) const;
64 
65  std::size_t getNumEntries() const;
66 
67  void clear();
68 
69  bool removeEntry(const std::string& parent_type);
70 
72 
74 
76 
78 
80 
82 
84 
86 
88 
89  void load(std::istream& is);
90 
91  void loadDefaults();
92 
93  static void set(const SharedPointer& map);
94 
95  static const SharedPointer& get();
96 
97  private:
98  static SharedPointer defaultMap;
99  DataStorage entries;
100  };
101  } // namespace ForceField
102 } // namespace CDPL
103 
104 #endif // CDPL_FORCEFIELD_MMFF94HEAVYTOHYDROGENATOMTYPEMAP_HPP
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::getEntriesBegin
ConstEntryIterator getEntriesBegin() const
APIPrefix.hpp
Definition of the preprocessor macro CDPL_FORCEFIELD_API.
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::begin
ConstEntryIterator begin() const
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::getEntriesEnd
ConstEntryIterator getEntriesEnd() const
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::loadDefaults
void loadDefaults()
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::get
static const SharedPointer & get()
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::end
EntryIterator end()
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap
Definition: MMFF94HeavyToHydrogenAtomTypeMap.hpp:48
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::removeEntry
bool removeEntry(const std::string &parent_type)
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::Entry
DataStorage::value_type Entry
Definition: MMFF94HeavyToHydrogenAtomTypeMap.hpp:57
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::set
static void set(const SharedPointer &map)
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::end
ConstEntryIterator end() const
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::getEntriesBegin
EntryIterator getEntriesBegin()
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::begin
EntryIterator begin()
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::addEntry
void addEntry(const std::string &parent_type, const std::string &hyd_type)
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::getNumEntries
std::size_t getNumEntries() const
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::getEntry
const std::string & getEntry(const std::string &parent_type) const
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::load
void load(std::istream &is)
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::getEntriesEnd
EntryIterator getEntriesEnd()
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::SharedPointer
std::shared_ptr< MMFF94HeavyToHydrogenAtomTypeMap > SharedPointer
Definition: MMFF94HeavyToHydrogenAtomTypeMap.hpp:53
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::MMFF94HeavyToHydrogenAtomTypeMap
MMFF94HeavyToHydrogenAtomTypeMap()
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::clear
void clear()
CDPL_FORCEFIELD_API
#define CDPL_FORCEFIELD_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::EntryIterator
DataStorage::iterator EntryIterator
Definition: MMFF94HeavyToHydrogenAtomTypeMap.hpp:56
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::ConstEntryIterator
DataStorage::const_iterator ConstEntryIterator
Definition: MMFF94HeavyToHydrogenAtomTypeMap.hpp:55
CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap::removeEntry
EntryIterator removeEntry(const EntryIterator &it)