/* * AtomFragmentsMap.hpp * * Created on: Mar 7, 2016 * Author: heber */ #ifndef ATOMFRAGMENTSMAP_HPP_ #define ATOMFRAGMENTSMAP_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "CodePatterns/Singleton.hpp" #include #include #include #include #include #include #include #include "types.hpp" class KeySet; class Graph; /** This class creates in instantiation a map connecting each atom with * the (known) fragments it takes part in. * * In the HomologyGraph and its -Container we do not have this information * any longer. However, we need this in order to make statements about atomic * properties from calculated fragment properties. * */ class AtomFragmentsMap : public Singleton { public: //** Function to insert new fragments into storage container. void insert( const Graph &_graph, size_t _MaxOrder); /** Function to clear the container. * */ void clear() { atommap.clear(); } typedef std::list keysets_t; //!> typedef for the internal map typedef std::map AtomFragmentsMap_t; const AtomFragmentsMap_t& getMap() const { return atommap; } private: //!> grant singleton pattern access to private cstor/dstor friend class Singleton; /** Private default cstor. * */ AtomFragmentsMap() {} /** Private default dstor. * */ ~AtomFragmentsMap() {} private: //!> internal map filled on instantiation AtomFragmentsMap_t atommap; private: friend class boost::serialization::access; // serialization template void serialize(Archive& ar, const unsigned int version) { ar & atommap; } }; #endif /* ATOMFRAGMENTSMAP_HPP_ */