IMP logo
IMP Reference Guide  develop.62cd6b8d93,2024/10/30
The Integrative Modeling Platform
IMP::core::Hierarchy Class Reference

A decorator for helping deal with a generalized hierarchy. More...

#include <IMP/core/Hierarchy.h>

+ Inheritance diagram for IMP::core::Hierarchy:

Detailed Description

A decorator for helping deal with a generalized hierarchy.

See HierarchyTraits for an example of how to define a custom hierarchy and IMP::atom::Hierarchy for a hierarchy for molecules.

See Also
HierarchyTraits

Definition at line 86 of file core/Hierarchy.h.

Public Types

typedef HierarchyTraits DecoratorTraits
 

Public Member Functions

 Hierarchy (const IMP::ParticleAdaptor &d, const HierarchyTraits &tr=get_default_traits())
 
 Hierarchy (::IMP::Model *m,::IMP::ParticleIndex id, const HierarchyTraits &tr=get_default_traits())
 
void add_child (Hierarchy h) const
 
void add_child_at (Hierarchy h, unsigned int pos)
 
void clear_children ()
 
Hierarchy get_child (unsigned int i) const
 
ParticleIndex get_child_index (unsigned int i) const
 
int get_child_index () const
 Return i such that get_parent().get_child(i) == this More...
 
GenericHierarchies get_children () const
 
ParticleIndexes get_children_indexes () const
 
const DecoratorTraitsget_decorator_traits () const
 
unsigned int get_number_of_children () const
 
Hierarchy get_parent () const
 
HierarchyTraits get_traits ()
 
void remove_child (unsigned int i)
 
void remove_child (Hierarchy h)
 
void show (std::ostream &out=std::cout) const
 
- Public Member Functions inherited from IMP::Decorator
bool get_is_valid () const
 Returns true if constructed with a non-default constructor. More...
 
Modelget_model () const
 Returns the Model containing the particle. More...
 
Particleget_particle () const
 Returns the particle decorated by this decorator. More...
 
ParticleIndex get_particle_index () const
 Returns the particle index decorated by this decorator. More...
 
 operator Particle * () const
 
 operator ParticleIndex () const
 
Particleoperator-> () const
 

Static Public Member Functions

static TriggerKey get_changed_key ()
 The key used to signal to the Model that the Hierarchy has changed. More...
 
static const DecoratorTraitsget_default_decorator_traits ()
 
static const HierarchyTraitsget_default_traits ()
 Get the default hierarchy traits. More...
 
static bool get_is_setup (const IMP::ParticleAdaptor &p, const HierarchyTraits &tr=get_default_traits())
 
static bool get_is_setup (Model *, ParticleIndex, HierarchyTraits=Hierarchy::get_default_traits())
 
static Hierarchy setup_particle (IMP::ParticleAdaptor d, DecoratorTraits tr=get_default_decorator_traits())
 
static Hierarchy setup_particle (Model *m, ParticleIndex pi, DecoratorTraits tr=get_default_decorator_traits())
 
static Hierarchy setup_particle (Model *m, ParticleIndex pi, ParticleIndexes children, DecoratorTraits tr=get_default_decorator_traits())
 
static Hierarchy setup_particle (IMP::ParticleAdaptor d, ParticleIndexes children, DecoratorTraits tr=get_default_decorator_traits())
 
static Hierarchy setup_particle (IMP::ParticleAdaptor d, ParticlesTemp children, DecoratorTraits tr=get_default_decorator_traits())
 
static Hierarchy setup_particle (Model *m, ParticleIndex pi, ParticlesTemp children, DecoratorTraits tr=get_default_decorator_traits())
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::Decorator
 Decorator (Model *m, ParticleIndex pi)
 
 Decorator (ParticleAdaptor p)
 

Member Function Documentation

static TriggerKey IMP::core::Hierarchy::get_changed_key ( )
static

The key used to signal to the Model that the Hierarchy has changed.

int IMP::core::Hierarchy::get_child_index ( ) const

Return i such that get_parent().get_child(i) == this

static const HierarchyTraits& IMP::core::Hierarchy::get_default_traits ( )
static

Get the default hierarchy traits.

static bool IMP::core::Hierarchy::get_is_setup ( Model ,
ParticleIndex  ,
HierarchyTraits  = Hierarchy::get_default_traits() 
)
static

Check if the particle has the needed attributes for a cast to succeed

Definition at line 123 of file core/Hierarchy.h.

Hierarchy IMP::core::Hierarchy::get_parent ( ) const
Returns
the parent particle, or Hierarchy() if it has no parent.

Definition at line 134 of file core/Hierarchy.h.

+ Here is the call graph for this function:

static Hierarchy IMP::core::Hierarchy::setup_particle ( Model m,
ParticleIndex  pi,
DecoratorTraits  tr = get_default_decorator_traits() 
)
static
Returns
a Hierarchy object that decorates particle pi

Definition at line 116 of file core/Hierarchy.h.

static Hierarchy IMP::core::Hierarchy::setup_particle ( Model m,
ParticleIndex  pi,
ParticleIndexes  children,
DecoratorTraits  tr = get_default_decorator_traits() 
)
static

Setup the particle and add children.

Definition at line 118 of file core/Hierarchy.h.


The documentation for this class was generated from the following file: