8#ifndef IMPEXAMPLE_EXAMPLE_DECORATOR_H
9#define IMPEXAMPLE_EXAMPLE_DECORATOR_H
11#include <IMP/example/example_config.h>
19IMPEXAMPLE_BEGIN_NAMESPACE
32class IMPEXAMPLEEXPORT ExampleDecorator :
public Decorator {
48 m->add_attribute(get_name_key(), pi, name);
54 return m->get_has_attribute(get_name_key(), pi);
77IMPEXAMPLE_END_NAMESPACE
The base class for decorators.
Storage of a model, its restraints, constraints and particles.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Interface to specialized Particle types (e.g. atoms).
Particle * get_particle() const
Returns the particle decorated by this decorator.
Class for storing model, its restraints, constraints, and particles.
A simple decorator which adds a name to a particle.
void set_decorator_name(std::string nm)
Set the name added to the particle.
static bool get_is_setup(Model *m, ParticleIndex pi)
return true if the particle has a name
std::string get_decorator_name() const
Get the name added to the particle.
Helper macros for implementing Decorators.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_DECORATOR_METHODS(Name, Parent)
Exception definitions and assertions.
Index< ParticleIndexTag > ParticleIndex
Key< 2 > StringKey
The type used to identify string attributes in the Particles.
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.