8 #ifndef IMPCORE_TYPED_H
9 #define IMPCORE_TYPED_H
11 #include <IMP/core/core_config.h>
20 IMPCORE_BEGIN_NAMESPACE
23 #define IMP_PARTICLE_TYPE_INDEX 34897493
41 inline static IntKey get_type_key();
63 IntKey Typed::get_type_key() {
64 static IntKey k(
"particle type");
The base class for decorators.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
Model * get_model() const
Returns the Model containing the particle.
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
A more IMP-like version of the std::vector.
Class for storing model, its restraints, constraints, and particles.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle attribute with the specified key and initial value
Helper macros for implementing Decorators.
Key< 1 > IntKey
The type used to identify int attributes in the Particles.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
set the value of particle attribute with the specified key
Interface to specialized Particle types (e.g. atoms)
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
A decorator for classifying particles in your system.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key