IMP
2.1.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
kernel/Particle.h
Go to the documentation of this file.
1
/**
2
* \file IMP/kernel/Particle.h
3
* \brief Classes to handle individual model particles.
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPKERNEL_PARTICLE_H
10
#define IMPKERNEL_PARTICLE_H
11
12
#include <IMP/kernel/kernel_config.h>
13
#include "
declare_Particle.h
"
14
#include "
Model.h
"
15
#include "
Decorator.h
"
16
17
IMPKERNEL_BEGIN_NAMESPACE
18
19
// for swig
20
class
Decorator
;
21
class
Particle
;
22
23
/** Take Decorator or Particle. */
24
class
ParticleAdaptor
:
public
base::InputAdaptor
{
25
Model
*m_;
26
ParticleIndex
pi_;
27
28
public
:
29
ParticleAdaptor
() : m_(
nullptr
), pi_() {}
30
ParticleAdaptor
(
Particle
*p) : m_(p->get_model()), pi_(p->get_index()) {}
31
ParticleAdaptor
(
const
Decorator
&d)
32
: m_(d.
get_model
()), pi_(d.get_particle_index()) {}
33
#ifndef SWIG
34
ParticleAdaptor
(
IMP::base::Pointer<Particle>
p)
35
: m_(p->get_model()), pi_(p->get_index()) {}
36
ParticleAdaptor
(
IMP::base::WeakPointer<Particle>
p)
37
: m_(p->get_model()), pi_(p->get_index()) {}
38
ParticleAdaptor
(
IMP::base::PointerMember<Particle>
p)
39
: m_(p->get_model()), pi_(p->get_index()) {}
40
#endif
41
Model
*get_model()
const
{
return
m_; }
42
ParticleIndex
get_particle_index()
const
{
return
pi_; }
43
};
44
45
IMPKERNEL_END_NAMESPACE
46
47
#endif
/* IMPKERNEL_PARTICLE_H */
declare_Particle.h
Classes to handle individual model particles.
IMP::base::PointerMember
A smart pointer to a ref-counted Object that is a class memeber.
Definition:
base/Pointer.h:146
Decorator.h
The base class for decorators.
IMP::kernel::Decorator::get_model
Model * get_model() const
Returns the Model containing the particle.
Definition:
kernel/Decorator.h:189
IMP::base::Pointer
A smart pointer to a reference counted object.
Definition:
base/Pointer.h:87
IMP::kernel::Decorator
Definition:
kernel/Decorator.h:114
IMP::kernel::ParticleAdaptor
Definition:
kernel/Particle.h:24
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
IMP::base::Index< ParticleIndexTag >
Model.h
Storage of a model, its restraints, constraints and particles.
IMP::base::WeakPointer
Definition:
base/WeakPointer.h:74
IMP::Particle
IMP::kernel::Particle Particle
Definition:
kernel/doxygen.h:100
IMP::base::InputAdaptor
Definition:
base/InputAdaptor.h:28
IMP::Decorator
IMP::kernel::Decorator Decorator
Definition:
kernel/doxygen.h:34
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/declare_Model.h:72