VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtSimComponentManager Class Reference

The DtSimComponentManager is the top level class within a DtVrfObject which owns and manages all the DtSimComponent instances for that object. More...

Public Member Functions

 DtSimComponentManager (DtVrfObject *vrfObject)
 read/writable constructor
virtual ~DtSimComponentManager ()
 destructor
virtual bool init ()
virtual void tick ()
virtual DtVrfObjectvrfObject () const
 This is a pointer to the simulation object for which this interface was created.
virtual bool addComponents ()
virtual bool addSensorComponent (DtSimComponent *component)
virtual bool addControllerComponent (DtSimComponent *component)
virtual bool addActuatorComponent (DtSimComponent *component)
virtual bool removeSensorComponent (DtSimComponent *component)
 Removes sensor from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().
virtual bool removeControllerComponent (DtSimComponent *component)
 Removes controller from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().
virtual bool removeActuatorComponent (DtSimComponent *component)
 Removes actuator from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().
virtual bool hasComponents () const
 Returns true if this object has components or systems, false otherwise.
virtual DtSimComponentlookupComponent (const DtString &name) const
 Lookup a particular component by its DtReaderWriter name.
virtual DtSimComponentListsensorComponentList () const
virtual DtControllerComponentListcontrollerComponentList () const
virtual DtSimComponentListactuatorComponentList () const
virtual DtString type () const
 Returns the type of component manager object.
virtual DtList * connectionList ()
virtual DtList * groupConnectionList ()
virtual void allSystems (DtComponentSystemList &)
 Given the supplied sytem list, puts all known systems into the list (including the base system)
virtual DtComponentSystembaseSystem ()
virtual const DtComponentSystembaseSystem () const

Static Public Member Functions

static
DtSimComponentManagerFactory
factory ()
 A DtSimEntityFactory is allocated by the DtSimCreator, and this pointer is set.
static void setFactory (DtSimComponentManagerFactory *factory)
static void addSimComponentManagerCreatorFcn (const DtString &type, DtSimComponentManagerCreatorFcn fcn)
static DtSimComponentManagercreator (DtVrfObject *vrfObject)
static DtSimComponentManagercreateComponentManager (const DtString &type, DtVrfObject *vrfObject)
 Creates a new component manager, using the factory.

Protected Member Functions

virtual void allSystems (DtComponentSystemList &, DtComponentSystem *)
 Used recursively from allSystems().

Protected Attributes

DtVrfObjectmyVrfObject
DtComponentSystemmyComponentSystem
DtList myConnectionList
DtList myGroupConnectionList

Static Protected Attributes

static
DtSimComponentManagerFactory
theFactory

Private Member Functions

 DtSimComponentManager ()
 Not implemented.
 DtSimComponentManager (const DtSimComponentManager &orig)
 Not implemented.
const DtSimComponentManageroperator= (const DtSimComponentManager &orig)
 Not implemented.

Detailed Description

The DtSimComponentManager is the top level class within a DtVrfObject which owns and manages all the DtSimComponent instances for that object.

It does much of this management though a DtSimComponentNetwork.

Constructor & Destructor Documentation

DtSimComponentManager::DtSimComponentManager ( )
private

Not implemented.

DtSimComponentManager::DtSimComponentManager ( const DtSimComponentManager orig)
private

Not implemented.

DtSimComponentManager::DtSimComponentManager ( DtVrfObject vrfObject)

read/writable constructor

virtual DtSimComponentManager::~DtSimComponentManager ( )
virtual

destructor

Member Function Documentation

const DtSimComponentManager& DtSimComponentManager::operator= ( const DtSimComponentManager orig)
private

Not implemented.

virtual bool DtSimComponentManager::init ( )
virtual
virtual void DtSimComponentManager::tick ( )
virtual
virtual DtVrfObject* DtSimComponentManager::vrfObject ( ) const
virtual

This is a pointer to the simulation object for which this interface was created.

virtual bool DtSimComponentManager::addComponents ( )
virtual
virtual bool DtSimComponentManager::addSensorComponent ( DtSimComponent component)
virtual
virtual bool DtSimComponentManager::addControllerComponent ( DtSimComponent component)
virtual
virtual bool DtSimComponentManager::addActuatorComponent ( DtSimComponent component)
virtual
virtual bool DtSimComponentManager::removeSensorComponent ( DtSimComponent component)
virtual

Removes sensor from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().

Does not delete the component.

virtual bool DtSimComponentManager::removeControllerComponent ( DtSimComponent component)
virtual

Removes controller from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().

Does not delete the component.

virtual bool DtSimComponentManager::removeActuatorComponent ( DtSimComponent component)
virtual

Removes actuator from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().

Does not delete the component.

virtual bool DtSimComponentManager::hasComponents ( ) const
virtual

Returns true if this object has components or systems, false otherwise.

virtual DtSimComponent* DtSimComponentManager::lookupComponent ( const DtString name) const
virtual

Lookup a particular component by its DtReaderWriter name.

It will search all systems on the entity.

Returns
The first component matching the given name
Note
Because this searches all systems on the entity, it is possible for there to be multiple components with the same name. The first one encountered in the search will be returned.
virtual DtSimComponentList* DtSimComponentManager::sensorComponentList ( ) const
virtual
virtual DtControllerComponentList* DtSimComponentManager::controllerComponentList ( ) const
virtual
virtual DtSimComponentList* DtSimComponentManager::actuatorComponentList ( ) const
virtual
virtual DtComponentSystem* DtSimComponentManager::baseSystem ( )
virtual
Returns
A pointer to the base system of this entity. This system contains all components and other systems of this entity.
virtual const DtComponentSystem* DtSimComponentManager::baseSystem ( ) const
virtual
Returns
A pointer to the base system of this entity. This system contains all components and other systems of this entity.
virtual DtString DtSimComponentManager::type ( ) const
virtual

Returns the type of component manager object.

Strings are defined in compMgrTypes.h.

virtual DtList* DtSimComponentManager::connectionList ( )
virtual
virtual DtList* DtSimComponentManager::groupConnectionList ( )
virtual
static DtSimComponentManagerFactory* DtSimComponentManager::factory ( )
static

A DtSimEntityFactory is allocated by the DtSimCreator, and this pointer is set.

The DtSimCreator deletes this pointer when it is deleted. This is done this way because we don't allow static initialization.

static void DtSimComponentManager::setFactory ( DtSimComponentManagerFactory factory)
static
static void DtSimComponentManager::addSimComponentManagerCreatorFcn ( const DtString type,
DtSimComponentManagerCreatorFcn  fcn 
)
static
static DtSimComponentManager* DtSimComponentManager::creator ( DtVrfObject vrfObject)
static
static DtSimComponentManager* DtSimComponentManager::createComponentManager ( const DtString type,
DtVrfObject vrfObject 
)
static

Creates a new component manager, using the factory.

virtual void DtSimComponentManager::allSystems ( DtComponentSystemList )
virtual

Given the supplied sytem list, puts all known systems into the list (including the base system)

virtual void DtSimComponentManager::allSystems ( DtComponentSystemList ,
DtComponentSystem  
)
protectedvirtual

Used recursively from allSystems().

Adds the supplied system then iterates over component network for other systems

Member Data Documentation

DtVrfObject* DtSimComponentManager::myVrfObject
protected
DtComponentSystem* DtSimComponentManager::myComponentSystem
protected
DtList DtSimComponentManager::myConnectionList
protected
DtList DtSimComponentManager::myGroupConnectionList
protected
DtSimComponentManagerFactory* DtSimComponentManager::theFactory
staticprotected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)