IMP  2.3.1
The Integrative Modeling Platform
ListPairContainer.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/ListPairContainer.h
3  * \brief Store a list of kernel::ParticlePairsTemp
4  *
5  * WARNING This file was generated from ListPairContainer.h
6  * in /tmp/nightly-build-29065/imp-2.3.1/tools/build/container_templates/container
7  * by tools/build/make_containers.py.
8  *
9  * Copyright 2007-2014 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_LIST_PAIR_CONTAINER_H
13 #define IMPCONTAINER_LIST_PAIR_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::ParticleIndexPairs
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 DynamicListPairContainer if you want to change the contents
31  frequently (eg via a kernel::ScoreState).
32  */
33 class IMPCONTAINEREXPORT ListPairContainer :
34 #if defined(IMP_DOXYGEN) || defined(SWIG)
35  public PairContainer
36 #else
37  public IMP::kernel::internal::StaticListContainer<
38  kernel::PairContainer>
39 #endif
40  {
41  typedef IMP::kernel::internal::StaticListContainer<kernel::PairContainer>
42  P;
43 
44  public:
46  std::string name = "ListPairContainer%1%");
47 
49  std::string name = "ListPairContainer%1%");
50 
51  void set_particle_pairs(const kernel::ParticlePairsTemp &ps);
52  void set_particle_pairs(const kernel::ParticleIndexPairs &contents);
53 #ifndef IMP_DOXYGEN
55  std::string name = "ListPairContainer %1%");
56  ListPairContainer(kernel::Model *m, const char *name);
57 
58  void add_particle_pair(const kernel::ParticlePair& vt);
59  void add_particle_pairs(const kernel::ParticlePairsTemp &c);
60  void clear_particle_pairs();
61 #endif
62 #ifdef SWIG
66  void do_apply(const PairModifier *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_PAIR_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.
virtual kernel::ParticleIndexPairs get_indexes() const =0
A shared container for Pairs.
A class to store an fixed array of same-typed values.
Definition: Array.h:33
Store a kernel::ParticleIndexPairs.
virtual kernel::ParticleIndexPairs get_range_indexes() const =0
A container for Pairs.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition: object_macros.h:52
virtual ModelObjectsTemp do_get_inputs() const =0
A base class for modifiers of kernel::ParticlePairsTemp.
A Modifier on kernel::ParticlePairsTemp.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73