IMP logo
IMP Reference Guide  2.7.0
The Integrative Modeling Platform
ListPairContainer.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-65341/imp-2.7.0/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-65341/imp-2.7.0/tools/build/container_templates/container/ListClassnameContainer.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/ListPairContainer.h
7  * \brief Store a list of ParticleIndexPairs.
8  *
9  * Copyright 2007-2017 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/object_macros.h>
17 #include <IMP/internal/StaticListContainer.h>
18 #include <IMP/PairContainer.h>
19 #include <IMP/PairModifier.h>
20 #include <IMP/base_types.h>
21 
22 IMPCONTAINER_BEGIN_NAMESPACE
23 
24 //! Store a list of 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 ScoreState).
32  */
33 class IMPCONTAINEREXPORT ListPairContainer :
34 #if defined(IMP_DOXYGEN) || defined(SWIG)
35  public PairContainer
36 #else
37  public IMP::internal::StaticListContainer<PairContainer>
38 #endif
39  {
40  typedef IMP::internal::StaticListContainer<PairContainer> P;
41 
42  public:
43  ListPairContainer(Model *m, const ParticleIndexPairs &contents,
44  std::string name = "ListPairContainer%1%");
45 
46  /** \deprecated_at{2.7} Use the index-based constructor instead */
47  IMPCONTAINER_DEPRECATED_METHOD_DECL(2.7)
49  std::string name = "ListPairContainer%1%");
50 
51 #ifndef IMP_DOXYGEN
53  std::string name = "ListPairContainer %1%");
54  ListPairContainer(Model *m, const char *name);
55 
56 #endif
57 #if defined(SWIG) || defined(IMP_DOXYGEN)
58  //! Add a single const ParticleIndexPair& to the container.
59  void add(const ParticleIndexPair& vt);
60 
61  //! Add ParticleIndexPairs to the container.
62  void add(const ParticleIndexPairs &c);
63 
64  //! Set the contents of the container to the given ParticleIndexPairs.
65  void set(ParticleIndexPairs cp);
66 
67  //! Clear the contents of the container.
68  void clear();
69 #endif
70 
71 #ifdef SWIG
75  void do_apply(const PairModifier *sm) const;
77 
78  private:
79  std::size_t do_get_contents_hash() const;
80 #endif
82 };
83 
85 
86 IMPCONTAINER_END_NAMESPACE
87 
88 #endif /* IMPCONTAINER_LIST_PAIR_CONTAINER_H */
virtual ParticleIndexPairs get_range_indexes() const =0
A shared container for Pairs.
Definition: PairContainer.h:37
Various general useful macros for IMP.
Basic types used by IMP.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A base class for modifiers of ParticlePairsTemp.
Definition: PairModifier.h:32
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Store a list of ParticleIndexPairs.
A container for Pairs.
A Modifier on ParticlePairsTemp.
#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 ParticleIndexPairs get_indexes() const =0
virtual ModelObjectsTemp do_get_inputs() const =0