IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
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-2022 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 class IMPKERNELEXPORT Configuration : public IMP::Object {
21  mutable Pointer<Model> model_;
22  Pointer<Object> base_;
23  internal::FloatAttributeTable floats_;
24  internal::FloatsAttributeTable float_lists_;
25  internal::StringAttributeTable strings_;
26  internal::IntAttributeTable ints_;
27  internal::ObjectAttributeTable objects_;
28  internal::WeakObjectAttributeTable weak_objects_;
29  internal::IntsAttributeTable int_lists_;
30  internal::ObjectsAttributeTable object_lists_;
31  internal::ParticleAttributeTable particles_;
32  internal::ParticlesAttributeTable particle_lists_;
33 
34  public:
35  Configuration(Model *m, std::string name = "Configuration %1%");
36  //! Only store parts of the configuration that have changed from base
37  /** At the moment, this does not play well with adding and removing
38  attributes.*/
40  std::string name = "Configuration %1%");
41  void load_configuration() const;
42  //! Swap the current configuration with that in the Model
43  /** This should be faster than loading (or at least not slower.
44  */
45  void swap_configuration();
47 };
48 
50 
51 IMPKERNEL_END_NAMESPACE
52 
53 #endif /* IMPKERNEL_CONFIGURATION_H */
A class to store a configuration of a model.
Definition: Configuration.h:20
#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:50
A smart pointer to a reference counted object.
Definition: Pointer.h:87
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Common base class for heavy weight IMP objects.
Definition: Object.h:111
#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.