VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtAttachmentManager Class Reference

The attachment manager maintains a tree of objects for the state repository class. More...

Inheritance diagram for DtAttachmentManager:
Inheritance graph
[legend]

Public Member Functions

 DtAttachmentManager (DtSimObjectStateRepository *owner)
 Constructor. More...
 
 DtAttachmentManager (const DtAttachmentManager &orig)
 Copy Constructor. More...
 
const DtAttachmentManageroperator= (const DtAttachmentManager &orig)
 Assignment Operator. More...
 
virtual ~DtAttachmentManager ()
 Destructor. More...
 
virtual DtAttachmentManagerclone () const
 Creates a new manager calling the copy constructor and returns the result. More...
 
virtual void attach (DtSimObjectStateRepository *obj)
 Attach a part. More...
 
virtual void detach (DtSimObjectStateRepository *obj)
 Detach a part. More...
 
virtual int numAttachments () const
 Returns the number of SRs attached. More...
 
virtual const
DtSimObjectStateRepositoryIterator
iterator () const
 Spawns an iterator that just iterates over the elements in this manager, but does not go down to any of the children. More...
 
virtual
DtRecursiveStateRepositoryIterator
spawnRecursiveIterator () const
 Spawns an iterator that iterates over the elements in this manager, and all their children, sub children, etc. More...
 
virtual void parentKinematicsChanged ()
 tell all elements that the kinematic state of the parent has changed so that they can invalidate cached vectors in the world coord system More...
 
virtual void setCoordinateSystem (const Coordinate_System *coordinateSystem)
 
const DtList & elements () const
 

Protected Member Functions

void emptyList ()
 Clean out the DtList of SR pointers, deleting as we go. More...
 
void copyList (const DtList &otherElements)
 Copy a list of state repositories. More...
 
virtual void processSimObjectRepositoryAboutToBeDeleted (DtSimObjectStateRepository *)
 

Static Protected Member Functions

static void simObjectRepositoryAboutToBeDeleted (DtSimObjectStateRepository *, void *)
 Callback made when a state rep is deleted, and, if it is still in the list, remove it as removing it when this manager is removed will also delete it. More...
 

Protected Attributes

DtList myElements
 The DtList of pointers to the attached state repositories. More...
 
DtSimObjectStateRepositorymyOwner
 
DtSimObjectStateRepositoryIteratormyIterator
 

Private Member Functions

 DtAttachmentManager ()
 Default Constructor. Do not use. More...
 

Detailed Description

The attachment manager maintains a tree of objects for the state repository class.

These objects are represented as other DtSimObjectStateRepositorys. Objects that need to maintain geometry with respect to some parent geometry use this manager.

Creation of the state repositories for the attached objects is done outside the manager; objects are attached and detached as required. The manager can provide iterators to traverse just the top level SRs it maintains or the entire forest it represents.

Constructor & Destructor Documentation

DtAttachmentManager::DtAttachmentManager ( )
private

Default Constructor. Do not use.

DtAttachmentManager::DtAttachmentManager ( DtSimObjectStateRepository owner)

Constructor.

DtAttachmentManager::DtAttachmentManager ( const DtAttachmentManager orig)

Copy Constructor.

virtual DtAttachmentManager::~DtAttachmentManager ( )
virtual

Destructor.

Member Function Documentation

const DtAttachmentManager& DtAttachmentManager::operator= ( const DtAttachmentManager orig)

Assignment Operator.

virtual DtAttachmentManager* DtAttachmentManager::clone ( ) const
virtual

Creates a new manager calling the copy constructor and returns the result.

Reimplemented in DtVrfAttachmentManager.

virtual void DtAttachmentManager::attach ( DtSimObjectStateRepository obj)
virtual

Attach a part.

virtual void DtAttachmentManager::detach ( DtSimObjectStateRepository obj)
virtual

Detach a part.

virtual int DtAttachmentManager::numAttachments ( ) const
virtual

Returns the number of SRs attached.

Referenced by DtRecursiveStateRepositoryIterator::next().

virtual const DtSimObjectStateRepositoryIterator& DtAttachmentManager::iterator ( ) const
virtual

Spawns an iterator that just iterates over the elements in this manager, but does not go down to any of the children.

virtual DtRecursiveStateRepositoryIterator* DtAttachmentManager::spawnRecursiveIterator ( ) const
virtual

Spawns an iterator that iterates over the elements in this manager, and all their children, sub children, etc.

. The caller MUST DELETE the iterator when done using it!

virtual void DtAttachmentManager::parentKinematicsChanged ( )
virtual

tell all elements that the kinematic state of the parent has changed so that they can invalidate cached vectors in the world coord system

virtual void DtAttachmentManager::setCoordinateSystem ( const Coordinate_System coordinateSystem)
virtual
const DtList& DtAttachmentManager::elements ( ) const
inline
void DtAttachmentManager::emptyList ( )
protected

Clean out the DtList of SR pointers, deleting as we go.

void DtAttachmentManager::copyList ( const DtList &  otherElements)
protected

Copy a list of state repositories.

Each repository is cloned. Used by assignment operator and copy constructor.

static void DtAttachmentManager::simObjectRepositoryAboutToBeDeleted ( DtSimObjectStateRepository ,
void *   
)
staticprotected

Callback made when a state rep is deleted, and, if it is still in the list, remove it as removing it when this manager is removed will also delete it.

Safeguard for double deletion

virtual void DtAttachmentManager::processSimObjectRepositoryAboutToBeDeleted ( DtSimObjectStateRepository )
protectedvirtual

Member Data Documentation

DtList DtAttachmentManager::myElements
protected

The DtList of pointers to the attached state repositories.

DtSimObjectStateRepository* DtAttachmentManager::myOwner
protected
DtSimObjectStateRepositoryIterator* DtAttachmentManager::myIterator
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)