/* * SaturatedFragment.hpp * * Created on: Mar 3, 2013 * Author: heber */ #ifndef SATURATEDFRAGMENT_HPP_ #define SATURATEDFRAGMENT_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "Fragmentation/KeySet.hpp" class HydrogenPool; /** The SaturatedFragment class acts as a wrapper to a KeySet by adding a list * of saturation hydrogens. * * This SaturatedFragment along with a currently leased set of hydrogens from the * HydrogenPool is all that is required to create a fully storable molecular * fragment from a given Keyset. * * The instance notes down its existence in an external container. * */ class SaturatedFragment { public: //!> typedef to a container to mark keysets that are in use typedef std::set KeySetsInUse_t; /** Constructor of SaturatedFragment requires \a set which we are tightly * associated. * * \param _set KeySet which this instance is associated with * \param _container container to add KeySet as in-use * \param _hydrogens pool with hydrogens for saturation */ SaturatedFragment( const KeySet &_set, KeySetsInUse_t &_container, HydrogenPool &_hydrogens); /** Destructor of class SaturatedFragment. * */ ~SaturatedFragment(); /** Getter for the KeySet this instance is associated with. * * \return const ref to KeySet */ const KeySet & getKeySet() const { return set; } private: //!> container to mark ourselves RAII-style KeySetsInUse_t &container; //!> key set this fragment is associated with. const KeySet &set; //!> pool with saturation hydrogens HydrogenPool &hydrogens; //!> key set containing all atoms used for e.g. storing this to file KeySet FullMolecule; //!> key set containing the ids of all hydrogens added for saturation KeySet SaturationHydrogens; }; #endif /* SATURATEDFRAGMENT_HPP_ */