#ifndef PERIODENTAFEL_HPP_ #define PERIODENTAFEL_HPP_ /*********************************************** includes ***********************************/ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "unittests/periodentafelTest.hpp" #include "Helpers/defs.hpp" #include "types.hpp" /****************************************** forward declarations *****************************/ class element; /********************************************** declarations *******************************/ /** Periodentafel is a list of all elements sorted by their atomic number. */ class periodentafel { /******* Types *********/ friend class periodentafelTest; private: typedef std::map elementSet; public: typedef elementSet::iterator iterator; typedef elementSet::const_iterator const_iterator; typedef std::reverse_iterator reverse_iterator; public: char header1[MAXSTRINGSIZE]; //!< store first header line char header2[MAXSTRINGSIZE]; //!< store second header line periodentafel(); ~periodentafel(); iterator AddElement(element * pointer); size_t RemoveElement(const element * pointer); size_t RemoveElement(atomicNumber_t); void CleanupPeriodtable(); const element * FindElement(atomicNumber_t) const; const element * FindElement(const std::string &shorthand) const; const element * AskElement() const; const element * EnterElement(); const_iterator begin() const; const_iterator end() const; reverse_iterator rbegin() const; reverse_iterator rend() const; bool Output(std::ostream * const output) const; bool LoadPeriodentafel(const char * const path); bool StorePeriodentafel(const char * const path) const; private: bool LoadElementsDatabase(std::istream &input); bool LoadValenceDatabase(std::istream *input); bool LoadOrbitalsDatabase(std::istream *input); bool LoadHBondAngleDatabase(std::istream *input); bool LoadHBondLengthsDatabase(std::istream *input); elementSet elements; }; #endif /*PERIODENTAFEL_HPP_*/