8 #ifndef IMPKERNEL_DECORATOR_H
9 #define IMPKERNEL_DECORATOR_H
11 #include <IMP/kernel/kernel_config.h>
18 #include "internal/utility.h"
23 IMPKERNEL_BEGIN_NAMESPACE
24 class ParticleAdaptor;
120 if (o < get_particle())
122 else if (o > get_particle())
142 bool __eq__(
base::Object* o)
const {
return operator==(o); }
143 bool __ne__(
base::Object* o)
const {
return operator!=(o); }
144 bool __lt__(
base::Object* o)
const {
return operator<(o); }
145 bool __gt__(
base::Object* o)
const {
return operator>(o); }
146 bool __ge__(
base::Object* o)
const {
return operator>=(o); }
147 bool __le__(
base::Object* o)
const {
return operator<=(o); }
171 "Particle " << pi_ <<
" is no longer part of the model.");
172 return model_->get_particle(pi_);
177 operator Particle*()
const {
return get_particle(); }
178 Particle* operator->()
const {
return get_particle(); }
179 operator ParticleIndex()
const {
return get_particle_index(); }
190 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
191 typedef boost::false_type DecoratorHasTraits;
198 IMPKERNELEXPORT
void check_particle(
Particle* p);
201 IMPKERNEL_END_NAMESPACE
ParticleIndex get_particle_index() const
Particle * get_particle() const
Model * get_model() const
Returns the Model containing the particle.
#define IMP_HASHABLE_INLINE(name, hashret)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
int compare(const VectorD< D > &a, const VectorD< D > &b)
lexicographic comparison of two vectors
A class for storing lists of IMP items.
Various general useful macros for IMP.
Class to handle individual model particles.
Storage of a model, its restraints, constraints and particles.
Common base class for heavy weight IMP objects.
A base class for constraints.
A nullptr-initialized pointer to an Object.
For backwards compatibility.
A shared base class to help in debugging and things.
IMP::kernel::Decorator Decorator
IMP::kernel::ParticleIndex ParticleIndex
Class for storing model, its restraints, constraints, and particles.