/* * ExportGraph.hpp * * Created on: 08.03.2012 * Author: heber */ #ifndef EXPORTGRAPH_HPP_ #define EXPORTGRAPH_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "Fragmentation/HydrogenSaturation_enum.hpp" #include "Fragmentation/Exporters/ExportGraph.hpp" #include "MoleculeListClass.hpp" #include "Fragmentation/Graph.hpp" class ListOfLocalAtoms_t; class molecule; /** ExportGraph is an interface definition of a class that takes a fragmented * system contained in an instance of Graph and exports it to some place else. * * Guidelines are as follows: * - all derived classes should have their specific properties set by extra * setters and not by passing them through the cstor * - operator() is called without arguments. */ class ExportGraph { public: ExportGraph( const Graph &_graph, const enum HydrogenTreatment _treatment, const enum HydrogenSaturation _saturation); virtual ~ExportGraph(); virtual void operator()(); private: void prepareMolecule(); molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem); int StoreFragmentFromKeySet_Init(molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList); void CreateInducedSubgraphOfFragment(molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem); protected: const Graph &TotalGraph; //!> internal list of created molecules MoleculeListClass BondFragments; //!> whether to always add already present hydrogens or not const enum HydrogenTreatment treatment; //!> whether to saturate dangling bonds or not const enum HydrogenSaturation saturation; }; #endif /* EXPORTGRAPH_HPP_ */