00001 /** 00002 * \file ListSingletonContainer.h \brief Store a list of Particles 00003 * 00004 * This file is generated by a script (core/tools/make-container). 00005 * Do not edit directly. 00006 * 00007 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00008 */ 00009 00010 #ifndef IMPCONTAINER_LIST_SINGLETON_CONTAINER_H 00011 #define IMPCONTAINER_LIST_SINGLETON_CONTAINER_H 00012 00013 #include "container_config.h" 00014 #include <IMP/core/internal/CoreListSingletonContainer.h> 00015 00016 IMPCONTAINER_BEGIN_NAMESPACE 00017 00018 //! Store a list of Particles 00019 /** \note The indexes can change when particles are inserted 00020 as the list is maintained in sorted order. 00021 */ 00022 class IMPCONTAINEREXPORT ListSingletonContainer: 00023 #if defined(IMP_DOXYGEN) || defined(SWIG) 00024 public SingletonContainer 00025 #else 00026 public core::internal::CoreListSingletonContainer 00027 #endif 00028 { 00029 typedef core::internal::CoreListSingletonContainer P; 00030 // for the change versions 00031 ListSingletonContainer(bool); 00032 public: 00033 //! construct and pass an initial set of particles 00034 ListSingletonContainer(const Particles &ps, 00035 std::string name= "ListSingletonContainer %1%"); 00036 00037 ListSingletonContainer(std::string name= "ListSingletonContainer %1%"); 00038 ListSingletonContainer(const char *name); 00039 00040 #if defined(IMP_DOXYGEN) || defined(SWIG) 00041 /** @name Methods to control the contained objects 00042 00043 This container stores a list of Particle objects. To manipulate 00044 the list use these methods. 00045 */ 00046 /**@{*/ 00047 void add_particle(Particle* vt); 00048 void add_particles(const ParticlesTemp &c); 00049 void set_particles(ParticlesTemp c); 00050 IMP_NO_DOXYGEN(void add_particles(const Particles &c) { 00051 add_particles(static_cast<const ParticlesTemp&>(c)); 00052 }) 00053 IMP_NO_DOXYGEN(void set_particles(const Particles &c) { 00054 set_particles(static_cast<ParticlesTemp>(c)); 00055 }) 00056 void clear_particles(); 00057 /**@}*/ 00058 IMP_SINGLETON_CONTAINER(ListSingletonContainer); 00059 #else 00060 static ListSingletonContainer *create_untracked_container() { 00061 ListSingletonContainer *lsc = new ListSingletonContainer(false); 00062 return lsc; 00063 } 00064 IMP_OBJECT(ListSingletonContainer); 00065 #endif 00066 }; 00067 00068 00069 IMPCONTAINER_END_NAMESPACE 00070 00071 #endif /* IMPCONTAINER_LIST_SINGLETON_CONTAINER_H */