IMP  2.2.1
The Integrative Modeling Platform
TripletContainerSet.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/TripletContainerSet.h
3  * \brief Store a set of TripletContainers
4  *
5  * This file is generated by a script (tools/maintenance/make-container).
6  * Do not edit directly.
7  *
8  * Copyright 2007-2014 IMP Inventors. All rights reserved.
9  */
10 
11 #ifndef IMPCONTAINER_TRIPLET_CONTAINER_SET_H
12 #define IMPCONTAINER_TRIPLET_CONTAINER_SET_H
13 
14 #include <IMP/container/container_config.h>
15 #include <IMP/TripletContainer.h>
16 #include <IMP/container_macros.h>
17 #include <IMP/kernel/internal/container_helpers.h>
18 #include <IMP/scoped.h>
19 
20 IMPCONTAINER_BEGIN_NAMESPACE
21 
22 //! Stores a set of TripletContainers
23 /** The input sets must be disjoint. This can change if there is
24  demand for it.
25 
26  \usesconstraint
27 */
28 class IMPCONTAINEREXPORT TripletContainerSet : public TripletContainer {
29  Ints versions_;
30  static TripletContainerSet *get_set(TripletContainer *c) {
31  return dynamic_cast<TripletContainerSet *>(c);
32  }
33  virtual std::size_t do_get_contents_hash() const IMP_OVERRIDE;
34 
35  public:
36  //! Construct and empty set
38  std::string name = "TripletContainerSet %1%");
39 
41  std::string name = "TripletContainerSet %1%");
42 
43  /** \brief apply modifer sm to all triplet containers */
44  IMP_IMPLEMENT(void do_apply(const TripletModifier *sm) const);
45 
46  template <class M>
47  void apply_generic(const M *m) const {
48  apply(m);
49  }
50 
53 
54  /** @name Methods to control the nested container
55 
56  This container merges a set of nested containers. To add
57  or remove nested containers, use the methods below.
58  */
59  /**@{*/
60  IMP_LIST_ACTION(public, TripletContainer, TripletContainers,
61  triplet_container, triplet_containers,
63  {
64  obj->set_was_used(true);
65  versions_.clear();
66  },
67  {}, );
68 /**@}*/
69 
70 #ifndef IMP_DOXYGEN
74 #endif
75 };
76 
77 IMPCONTAINER_END_NAMESPACE
78 
79 #endif /* IMPCONTAINER_TRIPLET_CONTAINER_SET_H */
void apply_generic(const M *m) const
apply modifer sm to all triplet containers
A shared container for Triplets.
Import IMP/kernel/scoped.h in the namespace.
IMP::base::Vector< IMP::base::WeakPointer< TripletContainer > > TripletContainersTemp
virtual ParticleIndexes get_all_possible_indexes() const =0
Get contained particles.
A base class for modifiers of kernel::ParticleTripletsTemp.
Import IMP/kernel/TripletContainer.h in the namespace.
virtual kernel::ParticleIndexTriplets get_indexes() const =0
virtual kernel::ParticleIndexTriplets get_range_indexes() const =0
Import IMP/kernel/container_macros.h in the namespace.
#define IMP_IMPLEMENT(signature)
void apply(const TripletModifier *sm) const
Apply a SingletonModifier to the contents.
IMP::base::Vector< IMP::base::Pointer< TripletContainer > > TripletContainers
Stores a set of TripletContainers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:72