IMP  2.1.1
The Integrative Modeling Platform
ListSingletonContainer.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/ListSingletonContainer.h
3  * \brief Store a list of ParticlesTemp
4  *
5  * WARNING This file was generated from ListSingletonContainer.h
6  * in /tmp/nightly-build-61576/imp-2.1.1/tools/build/container_templates/container
7  * by tools/maintenance/setup_containers.py.
8  *
9  * Copyright 2007-2013 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_LIST_SINGLETON_CONTAINER_H
13 #define IMPCONTAINER_LIST_SINGLETON_CONTAINER_H
14 
15 #include <IMP/container/container_config.h>
16 #include <IMP/base/object_macros.h>
17 #include <IMP/kernel/internal/InternalListSingletonContainer.h>
18 
19 IMPCONTAINER_BEGIN_NAMESPACE
20 
21 //! Store a ParticleIndexes
22 /** \note The order may change when particles are inserted
23  as the list is maintained in sorted order.
24 
25  \note Changing the contents of the container is a fairly heavy
26  weight operation as it resets part of the dependency graph. Use
27  a DynamicListSingletonContainer if you want to change the contents
28  frequently (eg via a kernel::ScoreState).
29  */
30 class IMPCONTAINEREXPORT ListSingletonContainer :
31 #if defined(IMP_DOXYGEN) || defined(SWIG)
32  public SingletonContainer
33 #else
34  public IMP::kernel::internal::InternalListSingletonContainer
35 #endif
36  {
37  typedef IMP::kernel::internal::InternalListSingletonContainer P;
38 
39  public:
41  std::string name = "ListSingletonContainer%1%");
42 
43  ListSingletonContainer(const ParticlesTemp &ps,
44  std::string name = "ListSingletonContainer%1%");
45 
46  void set_particles(const ParticlesTemp &ps);
47  void set_particles(const ParticleIndexes &contents);
48 #ifndef IMP_DOXYGEN
50  std::string name = "ListSingletonContainer %1%");
51  ListSingletonContainer(kernel::Model *m, const char *name);
52 
53  void add_particle(Particle* vt);
54  void add_particles(const ParticlesTemp &c);
55  void clear_particles();
56 #endif
57 #ifdef SWIG
60  void do_before_evaluate();
62  void do_apply(const SingletonModifier *sm) const;
64 #endif
66 };
67 
69 
70 IMPCONTAINER_END_NAMESPACE
71 
72 #endif /* IMPCONTAINER_LIST_SINGLETON_CONTAINER_H */
virtual ParticleIndexes get_all_possible_indexes() const =0
Get contained particles.
virtual ParticleIndexes get_indexes() const =0
A base class for modifiers of ParticlesTemp.
void add_particles(RMF::FileHandle fh, const kernel::ParticlesTemp &hs)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
virtual ParticleIndexes get_range_indexes() const =0
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
virtual ModelObjectsTemp do_get_inputs() const =0
Various general useful macros for IMP.
void add_particle(RMF::FileHandle fh, kernel::Particle *hs)
A shared container for Singletons.
Class for storing model, its restraints, constraints, and particles.