IMP  2.1.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-2013 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 #include <IMP/base/map.h>
17 
18 IMPKERNEL_BEGIN_NAMESPACE
19 
20 //! A class to store a configuration of a model
21 /** */
22 class IMPKERNELEXPORT Configuration : public IMP::base::Object {
23  mutable base::Pointer<Model> model_;
25  internal::FloatAttributeTable floats_;
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(kernel::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 nullptr-initialized pointer to an IMP Object.
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
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.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
A shared base class to help in debugging and things.
IMP::kernel::Configuration Configuration
Declare an efficient stl-compatible map.
Class for storing model, its restraints, constraints, and particles.