VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtOrganizationController Class Reference

DtOrganizationController is intended for any entity which will be a leaf node on the organization hierarchy. More...

Inheritance diagram for DtOrganizationController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtOrganizationController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
 DtOrganizationController (const DtOrganizationController &orig)
 copy constructor
const DtOrganizationControlleroperator= (const DtOrganizationController &orig)
 assignment operator
virtual ~DtOrganizationController ()
 destructor
virtual bool init ()
 Calls setRadio()
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void tick ()
 Checks for superior echelon id change, and changes this entity's echelon id if necessary.
virtual bool generateEchelonId (int designator)
 Generates an echelon id based on the provided designator, the local entity opd entry, and the current state of the organization hierarchy, and assigns the echelon id to the entity.
virtual void processSetDesignator (DtSimMessage *msg)
 Calls generateEchelonId with the designator provided in the message.
virtual bool tickWhileDestroyed () const
 Organization-related activities should happen regardless of destroyed status.

Static Public Member Functions

static void setDesignatorCallback (DtSimMessage *msg, void *usrData)
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual void setRadio (DtSimRadio *radio)
 Overrides this so it can register its interest in the set commands.

Protected Attributes

int myRequestedDesignator
 Used to store the requested designator if the echelon ID is not set immediatly.

Private Member Functions

 DtOrganizationController ()
 Default constructor; should not be called.

Detailed Description

DtOrganizationController is intended for any entity which will be a leaf node on the organization hierarchy.

End User Description: It will register for setEchelonId messages, and set this entity's echelon id accordingly. All non-aggregate entities should be configured with an instance of this controller.

Uses Descriptor Type: DtComponentDescriptor


Constructor & Destructor Documentation

Default constructor; should not be called.

Here because the compiler will generate an unprotected one otherwise.

DtOrganizationController::DtOrganizationController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

copy constructor

destructor


Member Function Documentation

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

assignment operator

virtual bool DtOrganizationController::init ( ) [virtual]

Calls setRadio()

Reimplemented from DtControllerComponent.

Reimplemented in DtTopLevelOrganizationController.

virtual DtString DtOrganizationController::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtOrganizationControllerType

Reimplemented from DtControllerComponent.

Reimplemented in DtAggregateOrganizationController, and DtTopLevelOrganizationController.

virtual void DtOrganizationController::tick ( ) [virtual]

Checks for superior echelon id change, and changes this entity's echelon id if necessary.

Reimplemented from DtSimComponent.

Reimplemented in DtAggregateOrganizationController, and DtTopLevelOrganizationController.

virtual bool DtOrganizationController::generateEchelonId ( int  designator) [virtual]

Generates an echelon id based on the provided designator, the local entity opd entry, and the current state of the organization hierarchy, and assigns the echelon id to the entity.

Returns true if the newly generated id is different from the currnet one.

Reimplemented in DtTopLevelOrganizationController.

Calls generateEchelonId with the designator provided in the message.

static void DtOrganizationController::setDesignatorCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static DtSimComponent* DtOrganizationController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

Reimplemented in DtAggregateOrganizationController, and DtTopLevelOrganizationController.

Organization-related activities should happen regardless of destroyed status.

Returns:
true.

Reimplemented from DtSimComponent.

virtual void DtOrganizationController::setRadio ( DtSimRadio radio) [protected, virtual]

Overrides this so it can register its interest in the set commands.

Reimplemented from DtControllerComponent.

Reimplemented in DtAggregateOrganizationController.


Member Data Documentation

Used to store the requested designator if the echelon ID is not set immediatly.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)