IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
Undecorator.h
Go to the documentation of this file.
1/**
2 * \file IMP/Undecorator.h \brief The base class for undecorators.
3 *
4 * Copyright 2007-2022 IMP Inventors. All rights reserved.
5 *
6 */
7
8#ifndef IMPKERNEL_UNDECORATOR_H
9#define IMPKERNEL_UNDECORATOR_H
10
11#include <IMP/kernel_config.h>
12#include "base_types.h"
13#include <IMP/Object.h>
14#include "particle_index.h"
15
16IMPKERNEL_BEGIN_NAMESPACE
17
18class Model;
19
20/** Undecorators can be registered with the model to tear down multi-particle
21 invariants when a particle is removed from the model. Decorators that
22 have such an invariant (eg an IMP::core::RigidBody) should register
23 an Undecorator when setup_particle is called.
24*/
25class IMPKERNELEXPORT Undecorator : public Object {
26 Model *m_;
27
28 public:
29 Undecorator(Model *m, std::string name);
30 virtual void teardown(ParticleIndex pi) const = 0;
31};
32
34
35IMPKERNEL_END_NAMESPACE
36
37#endif /* IMPKERNEL_UNDECORATOR_H */
A shared base class to help in debugging and things.
Basic types used by IMP.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
Object(std::string name)
Construct an object with the given name.
Index< ParticleIndexTag > ParticleIndex
Definition base_types.h:196
IMP::Vector< IMP::Pointer< Undecorator > > Undecorators
Definition Undecorator.h:33
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Functions and adaptors for dealing with particle indexes.