VR-Forces 4.2 Class Documentation
List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrf::DtActiveSonarModeRequestor Class Reference

The class that is the interface between the GUI and the back-end. More...

Inheritance diagram for makVrf::DtActiveSonarModeRequestor:
Inheritance graph
[legend]

Classes

struct  DtActiveSonarModeDataRecord
 Data structure used by this class to store entity data. More...

Public Member Functions

virtual ~DtActiveSonarModeRequestor ()
 Destructor.
virtual std::string currentModeFor (std::string entityName, int activeSonarId) const
 Gets the cached current mode for an entity given an active sonar id for that entity.
virtual std::vector< int > activeSonarIdsFor (std::string entityName) const
 Gets the cached active sonar ids for all active sonars on an entity.
virtual std::vector< std::string > activeSonarModesFor (std::string entityName, int activeSonarId) const
 Gets all the cached radar modes for an entity given an active sonar id for that entity.
virtual bool hasActiveSonarModesFor (std::string entityName) const
 Checks to see if there are radar modes in the cache for an entity.
virtual int groupIdsAndModes (std::vector< std::string > entities, std::vector< int > &returnIds, std::vector< std::string > &returnModes)
 Given a list of entities, gets the intersection of active sonar ids and those id's modes and returns them in single lists.
virtual int groupModes (std::vector< std::string > entities, int activeSonarId, std::vector< std::string > &returnModes)
 Given a list of entities, gets the intersection of the specified id's modes and returns them in a single list.
virtual void updateActiveSonarModes (std::string entityName)
 Request an update to the cached data from the sim for a specific entity.

Static Public Member Functions

static DtActiveSonarModeRequestorinstance (makVrv::DtDe &de)
 Returns instance of the DtActiveSonarModeRequestor.
static void registerInstance (makVrv::DtDe &de, DtActiveSonarModeRequestor *object)
 Register a subclass version of this class.

Public Attributes

boost::signal< void(std::string,
int)> 
signal_activeSonarModesReceived
 Signal sent when new data has arrived for a particular entity and its active sonar id.

Protected Member Functions

 DtActiveSonarModeRequestor (makVrv::DtDe &)
 Class constructor is protected, use instance function instead.
virtual void slot_onSimDataRemoved (makVrv::DtSimObjectEntry &)
 Handles the removal of the cache data when an entity is removed.
virtual void processActiveSonarModes (const DtVrfObjectMessage *msg)
 Handles radar mode updates either requested by updateActiveSonarModes() or from general state updates occuring from the sim.

Protected Attributes

makVrv::DtDe & myDe
std::map< std::string,
DtActiveSonarModeDataRecord
myEntitiesTable

Detailed Description

The class that is the interface between the GUI and the back-end.

Constructor & Destructor Documentation

virtual makVrf::DtActiveSonarModeRequestor::~DtActiveSonarModeRequestor ( )
virtual

Destructor.

makVrf::DtActiveSonarModeRequestor::DtActiveSonarModeRequestor ( makVrv::DtDe &  )
protected

Class constructor is protected, use instance function instead.

Member Function Documentation

static DtActiveSonarModeRequestor& makVrf::DtActiveSonarModeRequestor::instance ( makVrv::DtDe &  de)
static

Returns instance of the DtActiveSonarModeRequestor.

static void makVrf::DtActiveSonarModeRequestor::registerInstance ( makVrv::DtDe &  de,
DtActiveSonarModeRequestor object 
)
static

Register a subclass version of this class.

the instance() function will return the newly registered version once this has been called.

virtual std::string makVrf::DtActiveSonarModeRequestor::currentModeFor ( std::string  entityName,
int  activeSonarId 
) const
virtual

Gets the cached current mode for an entity given an active sonar id for that entity.

virtual std::vector<int> makVrf::DtActiveSonarModeRequestor::activeSonarIdsFor ( std::string  entityName) const
virtual

Gets the cached active sonar ids for all active sonars on an entity.

virtual std::vector<std::string> makVrf::DtActiveSonarModeRequestor::activeSonarModesFor ( std::string  entityName,
int  activeSonarId 
) const
virtual

Gets all the cached radar modes for an entity given an active sonar id for that entity.

virtual bool makVrf::DtActiveSonarModeRequestor::hasActiveSonarModesFor ( std::string  entityName) const
virtual

Checks to see if there are radar modes in the cache for an entity.

virtual int makVrf::DtActiveSonarModeRequestor::groupIdsAndModes ( std::vector< std::string >  entities,
std::vector< int > &  returnIds,
std::vector< std::string > &  returnModes 
)
virtual

Given a list of entities, gets the intersection of active sonar ids and those id's modes and returns them in single lists.

Intersection meaning commonality between the entities in cache.

virtual int makVrf::DtActiveSonarModeRequestor::groupModes ( std::vector< std::string >  entities,
int  activeSonarId,
std::vector< std::string > &  returnModes 
)
virtual

Given a list of entities, gets the intersection of the specified id's modes and returns them in a single list.

Intersection meaning commonality between the entities in cache.

virtual void makVrf::DtActiveSonarModeRequestor::updateActiveSonarModes ( std::string  entityName)
virtual

Request an update to the cached data from the sim for a specific entity.

virtual void makVrf::DtActiveSonarModeRequestor::slot_onSimDataRemoved ( makVrv::DtSimObjectEntry &  )
protectedvirtual

Handles the removal of the cache data when an entity is removed.

virtual void makVrf::DtActiveSonarModeRequestor::processActiveSonarModes ( const DtVrfObjectMessage msg)
protectedvirtual

Handles radar mode updates either requested by updateActiveSonarModes() or from general state updates occuring from the sim.

Member Data Documentation

boost::signal<void (std::string, int)> makVrf::DtActiveSonarModeRequestor::signal_activeSonarModesReceived

Signal sent when new data has arrived for a particular entity and its active sonar id.

makVrv::DtDe& makVrf::DtActiveSonarModeRequestor::myDe
protected
std::map<std::string, DtActiveSonarModeDataRecord> makVrf::DtActiveSonarModeRequestor::myEntitiesTable
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)