IMP  2.0.0
The Integrative Modeling Platform
SingletonContainerSet.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/SingletonContainerSet.h
3  * \brief Store a set of SingletonContainers
4  *
5  * This file is generated by a script (tools/maintenance/make-container).
6  * Do not edit directly.
7  *
8  * Copyright 2007-2013 IMP Inventors. All rights reserved.
9  */
10 
11 #ifndef IMPCONTAINER_SINGLETON_CONTAINER_SET_H
12 #define IMPCONTAINER_SINGLETON_CONTAINER_SET_H
13 
14 #include <IMP/container/container_config.h>
15 #include <IMP/SingletonContainer.h>
16 #include <IMP/container_macros.h>
17 #include <IMP/internal/container_helpers.h>
18 #include <IMP/scoped.h>
19 
20 IMPCONTAINER_BEGIN_NAMESPACE
21 
22 //! Stores a set of SingletonContainers
23 /** The input sets must be disjoint. This can change if there is
24  demand for it.
25 
26  \usesconstraint
27 */
28 class IMPCONTAINEREXPORT SingletonContainerSet
29  : public SingletonContainer
30 {
31  static SingletonContainerSet* get_set(SingletonContainer* c) {
32  return dynamic_cast<SingletonContainerSet*>(c);
33  }
34  public:
35  //! Construct and empty set
37  std::string name="SingletonContainerSet %1%");
38 
40  std::string name="SingletonContainerSet %1%");
41 
42  /** \brief apply modifer sm to all singleton containers */
43  IMP_IMPLEMENT(void do_apply(const SingletonModifier *sm) const);
44 
45  template <class M>
46  void apply_generic(const M*m) const {
47  apply(m);
48  }
49 
52 
53  /** @name Methods to control the nested container
54 
55  This container merges a set of nested containers. To add
56  or remove nested containers, use the methods below.
57  */
58  /**@{*/
59  IMP_LIST_ACTION(public, SingletonContainer, SingletonContainers,
60  singleton_container, singleton_containers,
62  {
63  obj->set_was_used(true);
64  set_is_changed(true);
65  },{},
66  );
67  /**@}*/
68 
69 #ifndef IMP_DOXYGEN
70  ParticleIndexes get_indexes() const;
71  ParticleIndexes get_range_indexes() const;
72  ModelObjectsTemp do_get_inputs() const;
73 #endif
74 
75  IMP_IMPLEMENT(void do_before_evaluate());
76 };
77 
78 
79 IMPCONTAINER_END_NAMESPACE
80 
81 #endif /* IMPCONTAINER_SINGLETON_CONTAINER_SET_H */