00001 /** 00002 * \file atom/BondPairContainer.h 00003 * \brief A fake container for bonds 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPATOM_BOND_PAIR_CONTAINER_H 00009 #define IMPATOM_BOND_PAIR_CONTAINER_H 00010 00011 #include "atom_config.h" 00012 #include "bond_decorators.h" 00013 00014 #include <IMP/PairContainer.h> 00015 #include <IMP/SingletonContainer.h> 00016 00017 IMPATOM_BEGIN_NAMESPACE 00018 00019 //! A container that returns pairs of the endpoints of the bonds. 00020 /** Turn a container of Bond particles into a container of ParticlePair 00021 objects of the endpoints. 00022 \ingroup bond 00023 \see Bonded 00024 */ 00025 class IMPATOMEXPORT BondPairContainer : 00026 public PairContainer 00027 { 00028 IMP::internal::OwnerPointer<SingletonContainer> sc_; 00029 BondPairContainer(SingletonContainer *sc, bool); 00030 public: 00031 //! The container containing the bonds 00032 BondPairContainer(SingletonContainer *sc); 00033 00034 static BondPairContainer *create_untracked_container(SingletonContainer *c) { 00035 BondPairContainer *lsc = new BondPairContainer(c, false); 00036 return lsc; 00037 } 00038 00039 IMP_PAIR_CONTAINER(BondPairContainer); 00040 }; 00041 00042 00043 IMPATOM_END_NAMESPACE 00044 00045 #endif /* IMPATOM_BOND_PAIR_CONTAINER_H */