/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010-2012 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * MoleculePtrDescriptor.cpp * * Created on: Feb 5, 2010 * Author: crueger */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "CodePatterns/MemDebug.hpp" #include "MoleculePtrDescriptor.hpp" #include "MoleculePtrDescriptor_impl.hpp" #include "CodePatterns/Observer/ObservedContainer_impl.hpp" #include "molecule.hpp" using namespace std; MoleculePtrDescriptor_impl::MoleculePtrDescriptor_impl(molecule * _ptr) : ptr(_ptr) {} MoleculePtrDescriptor_impl::~MoleculePtrDescriptor_impl() {} bool MoleculePtrDescriptor_impl::predicate(std::pair molecule) { return molecule.second==ptr; } MoleculeDescriptor MoleculeByPtr(molecule * ptr){ return MoleculeDescriptor(MoleculeDescriptor::impl_ptr(new MoleculePtrDescriptor_impl(ptr))); }