VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
DtLinkStrategy Class Referenceabstract

This is the DtLinkStrategy class. It is the abstract base class for all derived strategies. More...

+ Inheritance diagram for DtLinkStrategy:
+ Collaboration diagram for DtLinkStrategy:

Public Member Functions

 DtLinkStrategy (const std::string &name, DtManagedInterface *link)
 constructor takes name More...
 
virtual ~DtLinkStrategy ()
 destructor More...
 
std::string name ()
 Get the name of the strategy. More...
 
virtual bool init ()=0
 Initialize the strategy. More...
 
virtual void tick ()
 Tick the strategy to give it some CPU time. More...
 
virtual void shutdown ()
 Shutdown the strategy and release any resources. More...
 
virtual void addChildStrategy (DtLinkStrategy *strategy)
 Functions for adding, removing or finding any child strategies This is typically used for the initialization strategy that "owns" all the other strategies. More...
 
virtual bool removeChildStrategy (const std::string &name)
 
virtual DtLinkStrategyfindStrategy (const std::string &name)
 
virtual std::string & makeEmbeddedKey (std::string &embeddedKey, const std::string &hostGlobalId, unsigned embeddedIndex, const char *descriptor=nullptr)
 Combine the given host global/entity identifiers, embedded index, and optional descriptor to form the value of the given embedded key Return the embedded key. More...
 

Protected Attributes

DtManagedInterfacemyManagedInterface
 
std::string myName
 
std::string myEmbeddedKey
 
bool myInitalized
 
std::list< DtLinkStrategy * > myChildStrategies
 

Detailed Description

This is the DtLinkStrategy class. It is the abstract base class for all derived strategies.

Constructor & Destructor Documentation

DtLinkStrategy::DtLinkStrategy ( const std::string &  name,
DtManagedInterface link 
)

constructor takes name

virtual DtLinkStrategy::~DtLinkStrategy ( )
virtual

destructor

Member Function Documentation

virtual void DtLinkStrategy::addChildStrategy ( DtLinkStrategy strategy)
virtual

Functions for adding, removing or finding any child strategies This is typically used for the initialization strategy that "owns" all the other strategies.

virtual DtLinkStrategy* DtLinkStrategy::findStrategy ( const std::string &  name)
virtual
virtual bool DtLinkStrategy::init ( )
pure virtual

Initialize the strategy.

This function will be called multiple times to allow for dependent strategies to startup properly This function should return false if the strategy cannot get a resource it needs due to a dependency not being initialized yet.

Implemented in DtIffStrategy, DtEmitterStateStrategy, DtAcknowledgeStrategy, DtActionRequestStrategy, DtActionResponseStrategy, DtCollisionStrategy, DtDataStrategy, DtEventReportStrategy, DtSetDataStrategy, DtStartResumeStrategy, DtStopFreezeStrategy, DtDetonationStrategy, DtRadioReceiverStrategy, DtRadioTransmitterStrategy, DtEntityStateStrategy, DtSignalStrategy, DtFireStrategy, DtInitStrategy, and DtEntityUpdateStrategy.

virtual std::string& DtLinkStrategy::makeEmbeddedKey ( std::string &  embeddedKey,
const std::string &  hostGlobalId,
unsigned  embeddedIndex,
const char *  descriptor = nullptr 
)
virtual

Combine the given host global/entity identifiers, embedded index, and optional descriptor to form the value of the given embedded key Return the embedded key.

std::string DtLinkStrategy::name ( )

Get the name of the strategy.

virtual bool DtLinkStrategy::removeChildStrategy ( const std::string &  name)
virtual
virtual void DtLinkStrategy::shutdown ( )
virtual
virtual void DtLinkStrategy::tick ( )
virtual

Member Data Documentation

std::list<DtLinkStrategy*> DtLinkStrategy::myChildStrategies
protected
std::string DtLinkStrategy::myEmbeddedKey
protected
bool DtLinkStrategy::myInitalized
protected
DtManagedInterface* DtLinkStrategy::myManagedInterface
protected
std::string DtLinkStrategy::myName
protected

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

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)