#ifndef PERIODENTAFEL_HPP_ #define PERIODENTAFEL_HPP_ /*********************************************** includes ***********************************/ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "unittests/periodentafelTest.hpp" #include "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 * const pointer); size_t RemoveElement(element * const pointer); size_t RemoveElement(atomicNumber_t); void CleanupPeriodtable(); element * const FindElement(atomicNumber_t) const; element * const FindElement(const char * const shorthand) const; element * const AskElement() const; element * const EnterElement(); const_iterator begin(); const_iterator end(); reverse_iterator rbegin(); reverse_iterator rend(); bool Output(std::ostream * const output) const; bool Checkout(std::ostream * const output, const int * const checkliste) 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_*/