IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
ListSingletonContainer.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-16408/imp-2.14.0/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-16408/imp-2.14.0/tools/build/container_templates/container/ListClassnameContainer.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/ListSingletonContainer.h
7  * \brief Store a list of ParticleIndexes.
8  *
9  * Copyright 2007-2020 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/object_macros.h>
17 #include <IMP/internal/StaticListContainer.h>
18 #include <IMP/SingletonContainer.h>
19 #include <IMP/SingletonModifier.h>
20 #include <IMP/base_types.h>
21 
22 IMPCONTAINER_BEGIN_NAMESPACE
23 
24 //! Store a list of 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 ScoreState).
32  */
33 class IMPCONTAINEREXPORT ListSingletonContainer :
34 #if defined(IMP_DOXYGEN) || defined(SWIG)
35  public SingletonContainer
36 #else
37  public IMP::internal::StaticListContainer<SingletonContainer>
38 #endif
39  {
40  typedef IMP::internal::StaticListContainer<SingletonContainer> P;
41 
42  public:
43  ListSingletonContainer(Model *m, const ParticleIndexes &contents,
44  std::string name = "ListSingletonContainer%1%");
45 
46 #ifndef IMP_DOXYGEN
48  std::string name = "ListSingletonContainer %1%");
49  ListSingletonContainer(Model *m, const char *name);
50 
51 #endif
52 #if defined(SWIG) || defined(IMP_DOXYGEN)
53  //! Add a single ParticleIndex to the container.
54  void add(ParticleIndex vt);
55 
56  //! Add ParticleIndexes to the container.
57  void add(const ParticleIndexes &c);
58 
59  //! Set the contents of the container to the given ParticleIndexes.
60  void set(ParticleIndexes cp);
61 
62  //! Clear the contents of the container.
63  void clear();
64 #endif
65 
66 #ifdef SWIG
70  void do_apply(const SingletonModifier *sm) const;
72 
73  private:
74  std::size_t do_get_contents_hash() const;
75 #endif
77 };
78 
80 
81 IMPCONTAINER_END_NAMESPACE
82 
83 #endif /* IMPCONTAINER_LIST_SINGLETON_CONTAINER_H */
A base class for modifiers of ParticlesTemp.
A Modifier on ParticlesTemp.
Various general useful macros for IMP.
Basic types used by IMP.
virtual ParticleIndexes get_indexes() const =0
A container for Singletons.
#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
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Store a list of ParticleIndexes.
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.
virtual ModelObjectsTemp do_get_inputs() const =0