IMP  2.4.0
The Integrative Modeling Platform
kernel/Configuration.h
Go to the documentation of this file.
1 /**
2  * \file IMP/kernel/Configuration.h
3  * \brief Store a set of configurations of the model.
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPKERNEL_CONFIGURATION_H
10 #define IMPKERNEL_CONFIGURATION_H
11 
12 #include <IMP/kernel/kernel_config.h>
13 #include <IMP/base/Object.h>
14 #include <IMP/base/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::base::Object {
22  mutable base::Pointer<Model> model_;
24  internal::FloatAttributeTable floats_;
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(kernel::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 */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A smart pointer to a reference counted object.
Definition: Pointer.h:87
Storage of a model, its restraints, constraints and particles.
A class to store a configuration of a model.
Common base class for heavy weight IMP objects.
Definition: Object.h:106
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition: object_macros.h:52
A nullptr-initialized pointer to an IMP Object.
A shared base class to help in debugging and things.
IMP::kernel::Configuration Configuration
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73