8 #ifndef IMPEXAMPLE_EXAMPLE_DECORATOR_H
9 #define IMPEXAMPLE_EXAMPLE_DECORATOR_H
11 #include <IMP/example/example_config.h>
19 IMPEXAMPLE_BEGIN_NAMESPACE
54 return m->get_has_attribute(get_name_key(), pi);
77 IMPEXAMPLE_END_NAMESPACE
Import IMP/kernel/Decorator.h in the namespace.
Particle * get_particle() const
Returns the particle decorated by this decorator.
#define IMP_DECORATOR_METHODS(Name, Parent)
std::string get_decorator_name() const
Get the name added to the particle.
static bool get_is_setup(kernel::Model *m, kernel::ParticleIndex pi)
return true if the particle has a name
Exception definitions and assertions.
A simple decorator which adds a name to a particle.
Import IMP/kernel/decorator_macros.h in the namespace.
Storage of a model, its restraints, constraints and particles.
Classes to handle individual model particles. (Note that implementation of inline functions in in int...
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
void set_decorator_name(std::string nm)
Set the name added to the particle.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
Class for storing model, its restraints, constraints, and particles.