IMP  2.4.0
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 kernel::ParticlesTemp
4  *
5  * WARNING This file was generated from ListSingletonContainer.h
6  * in /tmp/nightly-build-65532/imp-2.4.0/tools/build/container_templates/container
7  * by tools/build/make_containers.py.
8  *
9  * Copyright 2007-2015 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/StaticListContainer.h>
20 #include <IMP/kernel/base_types.h>
21 
22 IMPCONTAINER_BEGIN_NAMESPACE
23 
24 //! Store a kernel::ParticleIndexes
25 /** \note The order may change when particles are inserted
26  as the list is maintained in sorted order.
27 
28  \note Changing the contents of the container is a fairly heavy
29  weight operation as it resets part of the dependency graph. Use
30  a DynamicListSingletonContainer if you want to change the contents
31  frequently (eg via a kernel::ScoreState).
32  */
33 class IMPCONTAINEREXPORT ListSingletonContainer :
34 #if defined(IMP_DOXYGEN) || defined(SWIG)
35  public SingletonContainer
36 #else
37  public IMP::kernel::internal::StaticListContainer<
38  kernel::SingletonContainer>
39 #endif
40  {
41  typedef IMP::kernel::internal::StaticListContainer<kernel::SingletonContainer>
42  P;
43 
44  public:
46  std::string name = "ListSingletonContainer%1%");
47 
49  std::string name = "ListSingletonContainer%1%");
50 
51  void set_particles(const kernel::ParticlesTemp &ps);
52  void set_particles(const kernel::ParticleIndexes &contents);
53 #ifndef IMP_DOXYGEN
55  std::string name = "ListSingletonContainer %1%");
56  ListSingletonContainer(kernel::Model *m, const char *name);
57 
59  void add_particles(const kernel::ParticlesTemp &c);
60  void clear_particles();
61 #endif
62 #ifdef SWIG
66  void do_apply(const SingletonModifier *sm) const;
68 
69  private:
70  std::size_t do_get_contents_hash() const;
71 #endif
73 };
74 
76 
77 IMPCONTAINER_END_NAMESPACE
78 
79 #endif /* IMPCONTAINER_LIST_SINGLETON_CONTAINER_H */
Various general useful macros for IMP.
virtual ParticleIndexes get_all_possible_indexes() const =0
Get contained particles.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Basic types used by IMP.
A base class for modifiers of kernel::ParticlesTemp.
virtual kernel::ParticleIndexes get_range_indexes() const =0
Store a kernel::ParticleIndexes.
void add_particles(RMF::FileHandle fh, const kernel::ParticlesTemp &hs)
Class to handle individual model particles.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition: object_macros.h:52
virtual kernel::ParticleIndexes get_indexes() const =0
virtual ModelObjectsTemp do_get_inputs() const =0
void add_particle(RMF::FileHandle fh, kernel::Particle *hs)
A Modifier on kernel::ParticlesTemp.
A container for Singletons.
A shared container for Singletons.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73