IMP logo
IMP Reference Guide  develop.36b5e40f34,2024/10/14
The Integrative Modeling Platform
DynamicListSingletonContainer.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-467/imp-20241014.develop.36b5e40f34/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-467/imp-20241014.develop.36b5e40f34/tools/build/container_templates/container/DynamicListClassnameContainer.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/DynamicListSingletonContainer.h
7  * \brief Store a list of ParticlesTemp
8  *
9  * Copyright 2007-2022 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_DYNAMIC_LIST_SINGLETON_CONTAINER_H
13 #define IMPCONTAINER_DYNAMIC_LIST_SINGLETON_CONTAINER_H
14 
15 #include <IMP/container/container_config.h>
16 #include <IMP/object_macros.h>
17 #include <IMP/internal/DynamicListContainer.h>
18 
19 IMPCONTAINER_BEGIN_NAMESPACE
20 
21 //! Store a ParticleIndexes
22 /** In contrast to ListSingletonContainer, this list is designed to act
23  as the output of a ScoreState or another container. The key difference
24  is that it uses the passed Container to define the list of all
25  possible contents of the container.
26  */
27 class IMPCONTAINEREXPORT DynamicListSingletonContainer :
28 #if defined(IMP_DOXYGEN) || defined(SWIG)
29  public SingletonContainer
30 #else
31  public IMP::internal::DynamicListContainer<SingletonContainer>
32 #endif
33  {
34  typedef IMP::internal::DynamicListContainer<SingletonContainer> P;
35 
36  public:
37  /** Constructs the dynamic list
38 
39  @param scope a container with a list of all possible particles that
40  are allowed to be dynamically added or removed in this
41  container
42  @param name the name of this container
43  */
44  DynamicListSingletonContainer(Container *scope, std::string name =
45  "ListSingletonContainer %1%");
46 
47  /** @name Methods to control the contained objects
48 
49  This container stores a list of Singleton objects. To manipulate
50  the list use these methods.
51  */
52  /**@{*/
53 #if defined(SWIG) || defined(IMP_DOXYGEN)
54  //! Add a single ParticleIndex to the container.
55  void add(ParticleIndex vt);
56 
57  //! Add ParticleIndexes to the container.
58  void add(const ParticleIndexes &c);
59 
60  //! Set the contents of the container to the given ParticleIndexes.
61  void set(ParticleIndexes cp);
62 
63  //! Clear the contents of the container.
64  void clear();
65 #endif
66 
67 /**@}*/
68 #ifdef SWIG
72  void do_apply(const SingletonModifier *sm) const;
73  void do_apply_moved(const SingletonModifier *sm,
74  const ParticleIndexes &moved_pis,
75  const ParticleIndexes &reset_pis) const;
77 #endif
79 };
80 
82 
83 IMPCONTAINER_END_NAMESPACE
84 
85 #endif /* IMPCONTAINER_DYNAMIC_LIST_SINGLETON_CONTAINER_H */
A base class for modifiers of ParticlesTemp.
Helper macros for implementing IMP Objects.
virtual ParticleIndexes get_indexes() const =0
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
virtual ParticleIndexes get_range_indexes() const =0
A shared container for Singletons.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
virtual ParticleIndexes get_all_possible_indexes() const =0
Get contained particles.
Abstract class for containers of particles.
virtual ModelObjectsTemp do_get_inputs() const =0