/* * MoleculeLeafClass.hpp * * Created on: Oct 20, 2011 * Author: heber */ #ifndef MOLECULELEAFCLASS_HPP_ #define MOLECULELEAFCLASS_HPP_ #ifdef HAVE_CONFIG_H #include #endif #include "Fragmentation/fragmentation_helpers.hpp" #include "Fragmentation/HydrogenSaturation_enum.hpp" class atom; class Graph; class molecule; /** A leaf for a tree of \a molecule class * Wraps molecules in a tree structure */ class MoleculeLeafClass { public: molecule *Leaf; //!< molecule of this leaf //MoleculeLeafClass *UpLeaf; //!< Leaf one level up //MoleculeLeafClass *DownLeaf; //!< First leaf one level down MoleculeLeafClass *previous; //!< Previous leaf on this level MoleculeLeafClass *next; //!< Next leaf on this level //MoleculeLeafClass(MoleculeLeafClass *Up, MoleculeLeafClass *Previous); MoleculeLeafClass(MoleculeLeafClass *PreviousLeaf); ~MoleculeLeafClass(); bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous); bool FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter, const enum HydrogenSaturation saturation); bool AssignKeySetsToFragment(molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false); void TranslateIndicesToGlobalIDs(Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph); int Count() const; }; #endif /* MOLECULELEAFCLASS_HPP_ */