IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
Configuration.h
Go to the documentation of this file.
1 /**
2  * \file IMP/Configuration.h
3  * \brief Store a set of configurations of the model.
4  *
5  * Copyright 2007-2020 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPKERNEL_CONFIGURATION_H
10 #define IMPKERNEL_CONFIGURATION_H
11 
12 #include <IMP/kernel_config.h>
13 #include <IMP/Object.h>
14 #include <IMP/Pointer.h>
15 #include "Model.h"
16 
17 IMPKERNEL_BEGIN_NAMESPACE
18 
19 //! A class to store a configuration of a model
20 /** */
21 class IMPKERNELEXPORT Configuration : public IMP::Object {
22  mutable Pointer<Model> model_;
23  Pointer<Object> base_;
24  internal::FloatAttributeTable floats_;
25  internal::FloatsAttributeTable float_lists_;
26  internal::StringAttributeTable strings_;
27  internal::IntAttributeTable ints_;
28  internal::ObjectAttributeTable objects_;
29  internal::WeakObjectAttributeTable weak_objects_;
30  internal::IntsAttributeTable int_lists_;
31  internal::ObjectsAttributeTable object_lists_;
32  internal::ParticleAttributeTable particles_;
33  internal::ParticlesAttributeTable particle_lists_;
34 
35  public:
36  Configuration(Model *m, std::string name = "Configuration %1%");
37  //! Only store parts of the configuration that have changed from base
38  /** At the moment, this does not play well with adding and removing
39  attributes.*/
41  std::string name = "Configuration %1%");
42  void load_configuration() const;
43  //! Swap the current configuration with that in the Model
44  /** This should be faster than loading (or at least not slower.
45  */
46  void swap_configuration();
48 };
49 
51 
52 IMPKERNEL_END_NAMESPACE
53 
54 #endif /* IMPKERNEL_CONFIGURATION_H */
A class to store a configuration of a model.
Definition: Configuration.h:21
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Storage of a model, its restraints, constraints and particles.
A more IMP-like version of the std::vector.
Definition: Vector.h:39
A smart pointer to a reference counted object.
Definition: Pointer.h:87
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Common base class for heavy weight IMP objects.
Definition: Object.h:106
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
A nullptr-initialized pointer to an IMP Object.
A shared base class to help in debugging and things.