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

The DtAutomaticBackendSelector will choose a backend based on the fewest number of simulated objects on that back-end, counted as 1 per each Entity/Unit and 1/10 for each Control Object. More...

Inheritance diagram for DtAutomaticBackendSelector:
Inheritance graph
[legend]

Classes

struct  BackendStatus
 

Public Member Functions

 DtAutomaticBackendSelector ()
 
virtual ~DtAutomaticBackendSelector ()
 
virtual bool init (DtVrfBackendListener *)
 
virtual DtSimulationAddress backendCreationAddress (const DtEntityType &ot, const DtSimulationAddress &original)
 
- Public Member Functions inherited from DtBackendSelectorHandler
 DtBackendSelectorHandler ()
 
virtual ~DtBackendSelectorHandler ()
 

Protected Types

typedef std::map< int,
std::vector
< DtSimulationAddress > > 
Scores
 
typedef std::map< DtString,
BackendStatus
Backends
 

Protected Member Functions

virtual void processBackendDiscovered (const DtSimulationAddress &)
 
virtual void processBackendRemoved (const DtSimulationAddress &)
 
virtual void processBackendStatusMessage (const DtSimulationAddress &)
 
virtual int totalScore (const DtBackend::ObjectCounts &) const
 Total score based on current object counts given. More...
 
virtual int score (int kind, int category) const
 The score of something for a kind and category. More...
 

Static Protected Member Functions

static void backedDiscoveredCallback (const DtSimulationAddress &, void *)
 
static void backedRemovedCallback (const DtSimulationAddress &, void *)
 
static void backendStatusMessageCallback (const DtSimulationAddress &, void *)
 

Protected Attributes

DtVrfBackendListenermyListener
 
Scores myScores
 
Backends myBackends
 

Detailed Description

The DtAutomaticBackendSelector will choose a backend based on the fewest number of simulated objects on that back-end, counted as 1 per each Entity/Unit and 1/10 for each Control Object.

When a backend is selected it's score will be modified by the potentially created object, and, will then be kept in that state until a backend update is received so it can recalculate. The lowest score will be the backend selected. If multiple backends have the lowest score, then, one will be selected at random

Member Typedef Documentation

typedef std::map<int, std::vector<DtSimulationAddress> > DtAutomaticBackendSelector::Scores
protected

Constructor & Destructor Documentation

DtAutomaticBackendSelector::DtAutomaticBackendSelector ( )
virtual DtAutomaticBackendSelector::~DtAutomaticBackendSelector ( )
virtual

Member Function Documentation

virtual bool DtAutomaticBackendSelector::init ( DtVrfBackendListener )
virtual
virtual DtSimulationAddress DtAutomaticBackendSelector::backendCreationAddress ( const DtEntityType &  ot,
const DtSimulationAddress &  original 
)
virtual
static void DtAutomaticBackendSelector::backedDiscoveredCallback ( const DtSimulationAddress &  ,
void *   
)
staticprotected
virtual void DtAutomaticBackendSelector::processBackendDiscovered ( const DtSimulationAddress &  )
protectedvirtual
static void DtAutomaticBackendSelector::backedRemovedCallback ( const DtSimulationAddress &  ,
void *   
)
staticprotected
virtual void DtAutomaticBackendSelector::processBackendRemoved ( const DtSimulationAddress &  )
protectedvirtual
static void DtAutomaticBackendSelector::backendStatusMessageCallback ( const DtSimulationAddress &  ,
void *   
)
staticprotected
virtual void DtAutomaticBackendSelector::processBackendStatusMessage ( const DtSimulationAddress &  )
protectedvirtual
virtual int DtAutomaticBackendSelector::totalScore ( const DtBackend::ObjectCounts ) const
protectedvirtual

Total score based on current object counts given.

virtual int DtAutomaticBackendSelector::score ( int  kind,
int  category 
) const
protectedvirtual

The score of something for a kind and category.

Member Data Documentation

DtVrfBackendListener* DtAutomaticBackendSelector::myListener
protected
Scores DtAutomaticBackendSelector::myScores
protected
Backends DtAutomaticBackendSelector::myBackends
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)