IMP logo
IMP Reference Guide  develop.27926d84dc,2024/04/19
The Integrative Modeling Platform
ListQuadContainer.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-49060/imp-20240419.develop.27926d84dc/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-49060/imp-20240419.develop.27926d84dc/tools/build/container_templates/container/ListClassnameContainer.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/ListQuadContainer.h
7  * \brief Store a list of ParticleIndexQuads.
8  *
9  * Copyright 2007-2022 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_LIST_QUAD_CONTAINER_H
13 #define IMPCONTAINER_LIST_QUAD_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/QuadContainer.h>
19 #include <IMP/QuadModifier.h>
20 #include <IMP/base_types.h>
21 #include <cereal/access.hpp>
22 #include <cereal/types/base_class.hpp>
23 
24 IMPCONTAINER_BEGIN_NAMESPACE
25 
26 //! Store a list of ParticleIndexQuads
27 /** \note The order may change when particles are inserted
28  as the list is maintained in sorted order.
29 
30  \note Changing the contents of the container is a fairly heavy
31  weight operation as it resets part of the dependency graph. Use
32  a DynamicListQuadContainer if you want to change the contents
33  frequently (eg via a ScoreState).
34  */
35 class IMPCONTAINEREXPORT ListQuadContainer :
36 #if defined(IMP_DOXYGEN) || defined(SWIG)
37  public QuadContainer
38 #else
39  public IMP::internal::StaticListContainer<QuadContainer>
40 #endif
41  {
42  typedef IMP::internal::StaticListContainer<QuadContainer> P;
43 
44  public:
45  ListQuadContainer(Model *m, const ParticleIndexQuads &contents,
46  std::string name = "ListQuadContainer%1%");
47 
48 #ifndef IMP_DOXYGEN
50  std::string name = "ListQuadContainer %1%");
51  ListQuadContainer(Model *m, const char *name);
53 
54 #endif
55 #if defined(SWIG) || defined(IMP_DOXYGEN)
56  //! Add a single const ParticleIndexQuad& to the container.
57  void add(const ParticleIndexQuad& vt);
58 
59  //! Add ParticleIndexQuads to the container.
60  void add(const ParticleIndexQuads &c);
61 
62  //! Set the contents of the container to the given ParticleIndexQuads.
63  void set(ParticleIndexQuads cp);
64 
65  //! Clear the contents of the container.
66  void clear();
67 #endif
68 
69 #ifdef SWIG
73  void do_apply(const QuadModifier *sm) const;
74  void do_apply_moved(const QuadModifier *sm,
75  const ParticleIndexes &moved_pis,
76  const ParticleIndexes &reset_pis) const;
78 
79  private:
80  std::size_t do_get_contents_hash() const;
81 #endif
83 
84  friend class cereal::access;
85 
86  template<class Archive> void serialize(Archive &ar) {
87  ar(cereal::base_class<P>(this));
88  }
90 };
91 
93 
94 IMPCONTAINER_END_NAMESPACE
95 
96 #endif /* IMPCONTAINER_LIST_QUAD_CONTAINER_H */
Helper macros for implementing IMP Objects.
Basic types used by IMP.
Store a list of ParticleIndexQuads.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A container for Quads.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
A Modifier on ParticleQuadsTemp.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition: object_macros.h:95
A shared container for Quads.
Definition: QuadContainer.h:39
#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 ParticleIndexQuads get_range_indexes() const =0
virtual ParticleIndexQuads get_indexes() const =0
A base class for modifiers of ParticleQuadsTemp.
Definition: QuadModifier.h:32
virtual ModelObjectsTemp do_get_inputs() const =0