11#include <IMP/core/core_config.h>
20IMPCORE_BEGIN_NAMESPACE
23#define IMP_PARTICLE_TYPE_INDEX 34897493
34class IMPCOREEXPORT Typed :
public Decorator {
37 m->add_attribute(get_type_key(), pi, t.get_index());
41 inline static IntKey get_type_key();
47 return m->get_has_attribute(get_type_key(), pi);
52 get_model()->get_attribute(get_type_key(), get_particle_index()));
55 void set_type(ParticleType pt)
const {
56 get_model()->set_attribute(get_type_key(), get_particle_index(),
63IntKey Typed::get_type_key() {
64 static IntKey k(
"particle type");
The base class for decorators.
Class for storing model, its restraints, constraints, and particles.
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)
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
IMP::Vector< ParticleType > ParticleTypes
Index< ParticleIndexTag > ParticleIndex
Key< 1 > IntKey
The type used to identify int attributes in the Particles.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.