Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Atlfast::AssociationManager Class Reference

#include <AssociationManager.h>

Inheritance diagram for Atlfast::AssociationManager:

Inheritance graph
[legend]
List of all members.

Public Methods

void associate (const ContainedObject *otherEntity)
void associate (const SmartRef< ContainedObject > *otherEntity)
SmartRefVector< ContainedObjectassociations () const
template<class T> SmartRefVector< T > associations (T) const
bool unAssociated () const
void reset ()

Protected Attributes

SmartRefVector< ContainedObjectm_associations

Detailed Description

This class has been provided as an interim solution to the association problem.
It provides an implemetation of a general templated association\ mechanism which allows any object which inherits from ContainedObject (A special Athena class used for items in the TES) to store a reference to any other such object.
A user can then subsequently retrieve a SmartRefVector containing SmartRefs to all stored associations or to a subset selected by class type. Templates have been used to avoid the user having to cast ContainedObject to specific classes in the latter case.
Every user class which wishes to use this mechanism simply inherits AssociationManager publically.


Member Function Documentation

void Atlfast::AssociationManager::associate const SmartRef< ContainedObject > *    otherEntity [inline]
 

void Atlfast::AssociationManager::associate const ContainedObject   otherEntity [inline]
 

Sets a simple one directional association between this entity and another.

otherEntity is automatically converted to SmartRef<ContainedObject>(otherEntity)

template<class T>
SmartRefVector<T> Atlfast::AssociationManager::associations   const [inline]
 

Returns a list of all entities of a certain class which have been associated with this object.
T must inherit from ContainedObject

SmartRefVector<ContainedObject> Atlfast::AssociationManager::associations   const [inline]
 

Returns a list of all entities associated with this object.

void Atlfast::AssociationManager::reset   [inline]
 

Reimplemented in Atlfast::Cell.

bool Atlfast::AssociationManager::unAssociated   const [inline]
 

A quick way to find out whether there are any associations at all.


Member Data Documentation

SmartRefVector<ContainedObject> Atlfast::AssociationManager::m_associations [protected]
 

This is the record of associations between ContainedObjects.

It is a vector of SmartRef<ContainedObject> pointing polymorphically to other ContainedObjects in the TES.


The documentation for this class was generated from the following file:
Generated on Thu Feb 21 14:31:41 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001