VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
DtSpotReportManager Class Referenceabstract

The DtSpotReportManager class is used manage and keep track of spot reports. by spotter and who they have spotted.

Inheritance diagram for DtSpotReportManager:
Inheritance graph
[legend]

Public Types

using SpotReportHandlersByC = std::map< DtUUID, std::unique_ptr< DtSpotReport >>
 
using SpotReportHandlersBySC = std::map< DtUUID, SpotReportHandlersByC >
 

Public Member Functions

 DtSpotReportManager ()
 
virtual ~DtSpotReportManager ()
 
virtual void requestSpotReports (const DtSimulationAddress &)
 
virtual bool isSpotReport (const DtUUID &) const
 
virtual bool removeSpotReport (const DtUUID &)
 
virtual void setSuspended (bool)
 
bool suspended () const
 
virtual std::set< DtUUID > observedBy (const DtUUID &) const
 
virtual std::set< DtUUID > observing (const DtUUID &) const
 
virtual DtSpotReportDataHandler * spotReportDataHandlerFor (const DtUUID &) const
 
const SpotReportHandlersBySC & spotReportHandlersByHandler () const
 
virtual void unmanageAndDeleteAllPerspectives ()
 
virtual void removeAllSpotReports ()
 
virtual void reset ()
 
template<typename Perspective_Name >
Perspective_Name * createAndManagePerspective (bool andRefresh=true)
 
virtual void managePerspective (DtSpotReportPerspectiveInterface *p)
 
virtual bool unmanagePerspective (DtSpotReportPerspectiveInterface *)
 
virtual void deleteAndUnmanagePerspective (DtSpotReportPerspectiveInterface *)
 
virtual void registerPerspectiveCreator (DtSpotReportPerspectiveCreatorInterface *)
 
const std::vector< int > & certaintyLevels () const
 
virtual void setCertaintyLevels (const std::vector< int > &)
 
virtual void setCertaintyLevel (int level, int time)
 
virtual int certaintyLevelForTime (double d) const
 
virtual void setSpotReportGatherTime (int)
 
virtual int spotReportGatherTime () const
 
virtual DtSpotReportDataHandler * createSpotReportDataHandler (const DtSpotReport *) const
 
virtual void createAndDeliverMessage (const DtSimulationAddress &, const DtSimInterfaceContent &)=0
 
virtual std::set
< DtSimulationAddress > 
backendsLoaded () const =0
 
virtual unsigned long generateRequestId ()=0
 
virtual double simTime () const =0
 
virtual const makVrf::DtStateData * dataFor (const DtUUID &) const =0
 
virtual bool anyBackendsPlaying () const =0
 
virtual int numberOfBackends () const =0
 
virtual double dateAndTimeOfDay () const =0
 
- Public Member Functions inherited from DtVrfSingletonRoot
 DtVrfSingletonRoot ()
 
virtual ~DtVrfSingletonRoot ()
 
template<typename T_Class >
T_Class * instance () const
 
virtual DtVrfSingleton * instance (const std::string &cls) const
 
virtual DtVrfSingleton * registerInstance (DtVrfSingleton *ins)
 

Public Attributes

boost::signals2::signal< void()> signal_allSpotReportsRemoved
 
boost::signals2::signal< void(DtSpotReport *)> signal_spotReportCreated
 
boost::signals2::signal< void(const
DtUUID &)> 
signal_contactDeleted
 
boost::signals2::signal< void(const
DtUUID &)> 
signal_spotterDeleted
 
boost::signals2::signal< void(const
DtSpotReport *)> 
signal_reportAboutToBeDeleted
 
boost::signals2::signal< void(const
DtSpotReport *)> 
signal_reportUpdated
 

Protected Types

using SpotReportRequests = std::map< unsigned long, std::set< DtSimulationAddress >>
 
using Observed = std::unordered_map< DtUUID, std::set< DtUUID >>
 
using Perspectives = std::set< DtSpotReportPerspectiveInterface * >
 
- Protected Types inherited from DtVrfSingletonRoot
using Instances = std::map< std::string, DtVrfSingleton * >
 

Protected Member Functions

virtual void processReceiveSpotReport (const DtVrfObjectMessage *msg)
 
virtual void processReceiveSpotReports (const DtVrfObjectMessage *msg)
 
virtual DtSpotReport * addOrUpdateSpotReport (DtSpotReport *, bool *createdNew=nullptr)
 
virtual void requestSpotReports ()
 
virtual void objectEntryRemoved (const DtUUID &)
 
virtual void spotterRemoved (const DtUUID &)
 
virtual void contactRemoved (const DtUUID &)
 
virtual void tick ()
 
virtual DtSpotReport * createSpotReport (const DtSpotReport *rep)
 
virtual void handlerAboutToBeDeleted (DtSpotReport *)
 
virtual void spotReportCreated (DtSpotReport *)
 
virtual void spotReportUpdated (DtSpotReport *)
 
virtual void updateFlushTime ()
 

Protected Attributes

unsigned long myResendId = 0
 
SpotReportHandlersBySC mySpotReportHandlersBySC
 
Observed myObservedBy
 
Observed myObserving
 
bool mySuspended
 
double myNextFlushDataTime
 
int myPauseFlushUpdate
 
Perspectives myPerspectives
 
int mySpotReportGatherTime = 3
 
std::vector< int > myCertaintyLevels
 
- Protected Attributes inherited from DtVrfSingletonRoot
Instances myInstances
 

Member Typedef Documentation

using DtSpotReportManager::SpotReportHandlersByC = std::map<DtUUID, std::unique_ptr<DtSpotReport>>

Spot report handlers are organized by spotter and contact.

using DtSpotReportManager::SpotReportRequests = std::map<unsigned long, std::set<DtSimulationAddress>>
protected
using DtSpotReportManager::Observed = std::unordered_map<DtUUID, std::set<DtUUID>>
protected

Constructor & Destructor Documentation

DtSpotReportManager::DtSpotReportManager ( )
virtual DtSpotReportManager::~DtSpotReportManager ( )
virtual

Member Function Documentation

virtual void DtSpotReportManager::requestSpotReports ( const DtSimulationAddress &  )
virtual
virtual bool DtSpotReportManager::isSpotReport ( const DtUUID &  ) const
virtual

Returns true if one of the perspectives has this spot report handler UUID.

virtual bool DtSpotReportManager::removeSpotReport ( const DtUUID &  )
virtual

Returns true if the spot report UUID is in a perspective and was removed.

virtual void DtSpotReportManager::setSuspended ( bool  )
virtual

Suspends ticking.

bool DtSpotReportManager::suspended ( ) const
inline
virtual std::set<DtUUID> DtSpotReportManager::observedBy ( const DtUUID &  ) const
virtual

The spotters that are observing the contact. In the case of a spot report UUID it will be what it is observed by.

virtual std::set<DtUUID> DtSpotReportManager::observing ( const DtUUID &  ) const
virtual

The contacts that this spotter is observing. If this is a contact will return who this contact is observed by.

virtual DtSpotReportDataHandler* DtSpotReportManager::spotReportDataHandlerFor ( const DtUUID &  ) const
virtual

Looks through all the managed perspectives to find the given handler with the spot report ID.

const SpotReportHandlersBySC& DtSpotReportManager::spotReportHandlersByHandler ( ) const
inline
virtual void DtSpotReportManager::unmanageAndDeleteAllPerspectives ( )
virtual
virtual void DtSpotReportManager::removeAllSpotReports ( )
virtual
virtual void DtSpotReportManager::reset ( )
virtual

Removes all spot report and resets flush data time.

template<typename Perspective_Name >
Perspective_Name* DtSpotReportManager::createAndManagePerspective ( bool  andRefresh = true)
inline

Creates a new perspective from a creator registered with this class and manages it in the tick() method.

Use andRefresh as false if you are going to set up conditions in the perspective after its creation to prevent unneccesary overhead of handling reports not needed. Once the conditions are set call refresh() on the perspective to evaluate current reports.

References DtVrfSingletonRoot::instance().

virtual void DtSpotReportManager::managePerspective ( DtSpotReportPerspectiveInterface *  p)
virtual
virtual bool DtSpotReportManager::unmanagePerspective ( DtSpotReportPerspectiveInterface *  )
virtual
virtual void DtSpotReportManager::deleteAndUnmanagePerspective ( DtSpotReportPerspectiveInterface *  )
virtual
virtual void DtSpotReportManager::registerPerspectiveCreator ( DtSpotReportPerspectiveCreatorInterface *  )
virtual
const std::vector<int>& DtSpotReportManager::certaintyLevels ( ) const
virtual void DtSpotReportManager::setCertaintyLevels ( const std::vector< int > &  )
virtual

Reimplemented in makVrf::DtVrfSpotReportManager.

virtual void DtSpotReportManager::setCertaintyLevel ( int  level,
int  time 
)
virtual

Reimplemented in makVrf::DtVrfSpotReportManager.

virtual int DtSpotReportManager::certaintyLevelForTime ( double  d) const
virtual

Given the time (in seconds) return the certainty level of the spot report. Return of -1 means that no level was found.

virtual void DtSpotReportManager::setSpotReportGatherTime ( int  )
virtual

Reimplemented in makVrf::DtVrfSpotReportManager.

virtual int DtSpotReportManager::spotReportGatherTime ( ) const
inlinevirtual

Reimplemented in makVrf::DtVrfSpotReportManager.

virtual DtSpotReportDataHandler* DtSpotReportManager::createSpotReportDataHandler ( const DtSpotReport *  ) const
virtual

Reimplemented in makVrf::DtVrfSpotReportManager.

virtual void DtSpotReportManager::processReceiveSpotReport ( const DtVrfObjectMessage *  msg)
protectedvirtual
virtual void DtSpotReportManager::processReceiveSpotReports ( const DtVrfObjectMessage *  msg)
protectedvirtual
virtual DtSpotReport* DtSpotReportManager::addOrUpdateSpotReport ( DtSpotReport *  ,
bool *  createdNew = nullptr 
)
protectedvirtual
virtual void DtSpotReportManager::requestSpotReports ( )
protectedvirtual

Requests spot reports from all currently loaded back-ends.

virtual void DtSpotReportManager::objectEntryRemoved ( const DtUUID &  )
protectedvirtual
virtual void DtSpotReportManager::spotterRemoved ( const DtUUID &  )
protectedvirtual
virtual void DtSpotReportManager::contactRemoved ( const DtUUID &  )
protectedvirtual
virtual void DtSpotReportManager::tick ( )
protectedvirtual

Reimplemented in makVrf::DtVrfSpotReportManager.

virtual DtSpotReport* DtSpotReportManager::createSpotReport ( const DtSpotReport *  rep)
protectedvirtual

Adds a new spot report into the system. If key exists will not and false returned.

virtual void DtSpotReportManager::handlerAboutToBeDeleted ( DtSpotReport *  )
protectedvirtual

Clears all spot reports and deletes all handlers.

virtual void DtSpotReportManager::spotReportCreated ( DtSpotReport *  )
protectedvirtual
virtual void DtSpotReportManager::spotReportUpdated ( DtSpotReport *  )
protectedvirtual
virtual void DtSpotReportManager::updateFlushTime ( )
protectedvirtual
virtual void DtSpotReportManager::createAndDeliverMessage ( const DtSimulationAddress &  ,
const DtSimInterfaceContent &   
)
pure virtual

Overrides needed to implement specifics for network transport.

Implemented in makVrf::DtVrfSpotReportManager, and DtRemoteControlSpotReportManager.

virtual std::set<DtSimulationAddress> DtSpotReportManager::backendsLoaded ( ) const
pure virtual
virtual unsigned long DtSpotReportManager::generateRequestId ( )
pure virtual
virtual double DtSpotReportManager::simTime ( ) const
pure virtual
virtual const makVrf::DtStateData* DtSpotReportManager::dataFor ( const DtUUID &  ) const
pure virtual
virtual bool DtSpotReportManager::anyBackendsPlaying ( ) const
pure virtual
virtual int DtSpotReportManager::numberOfBackends ( ) const
pure virtual
virtual double DtSpotReportManager::dateAndTimeOfDay ( ) const
pure virtual

Member Data Documentation

boost::signals2::signal<void()> DtSpotReportManager::signal_allSpotReportsRemoved
boost::signals2::signal<void(DtSpotReport*)> DtSpotReportManager::signal_spotReportCreated
boost::signals2::signal<void(const DtUUID&)> DtSpotReportManager::signal_contactDeleted
boost::signals2::signal<void(const DtUUID&)> DtSpotReportManager::signal_spotterDeleted
boost::signals2::signal<void(const DtSpotReport*)> DtSpotReportManager::signal_reportAboutToBeDeleted
boost::signals2::signal<void(const DtSpotReport*)> DtSpotReportManager::signal_reportUpdated
unsigned long DtSpotReportManager::myResendId = 0
protected
SpotReportHandlersBySC DtSpotReportManager::mySpotReportHandlersBySC
protected
Observed DtSpotReportManager::myObservedBy
protected
Observed DtSpotReportManager::myObserving
protected
bool DtSpotReportManager::mySuspended
protected
double DtSpotReportManager::myNextFlushDataTime
protected
int DtSpotReportManager::myPauseFlushUpdate
protected
Perspectives DtSpotReportManager::myPerspectives
protected
int DtSpotReportManager::mySpotReportGatherTime = 3
protected
std::vector<int> DtSpotReportManager::myCertaintyLevels
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)