FireSTARR
Loading...
Searching...
No Matches
fs::sim::MapObserver< T > Class Template Referenceabstract

An IObserver that tracks notification data using a GridMap. More...

#include <Observer.h>

Inheritance diagram for fs::sim::MapObserver< T >:
Collaboration diagram for fs::sim::MapObserver< T >:

Public Member Functions

 MapObserver (const MapObserver &rhs)=delete
 
 MapObserver (MapObserver &&rhs)=delete
 
MapObserveroperator= (const MapObserver &rhs)=delete
 
MapObserveroperator= (MapObserver &&rhs)=delete
 
 MapObserver (const Scenario &scenario, T nodata, string suffix)
 Keeps observations in a map.
 
virtual T getValue (const Event &event) const =0
 Function that returns the value we care about regarding the Event.
 
void handleEvent (const Event &event) override
 Handle given event.
 
void save (const string &dir, const string &base_name) const override
 Save observations.
 
void reset () noexcept override
 Clear all observations.
 
- Public Member Functions inherited from fs::sim::IObserver
 IObserver (const IObserver &rhs)=delete
 
 IObserver (IObserver &&rhs)=delete
 
IObserveroperator= (const IObserver &rhs)=delete
 
IObserveroperator= (IObserver &&rhs)=delete
 

Protected Attributes

unique_ptr< data::GridMap< T > > map_
 Map of observations.
 
const Scenarioscenario_
 Scenario being observed.
 
string suffix_
 Suffix to append to file during save.
 

Additional Inherited Members

- Static Public Member Functions inherited from fs::sim::IObserver
static string makeName (const string &base_name, const string &suffix)
 Make name to save file as.
 
- Protected Member Functions inherited from fs::sim::IObserver

Detailed Description

template<typename T>
class fs::sim::MapObserver< T >

An IObserver that tracks notification data using a GridMap.

Template Parameters
TType of map that is being tracked

Constructor & Destructor Documentation

◆ MapObserver()

template<typename T >
fs::sim::MapObserver< T >::MapObserver ( const Scenario & scenario,
T nodata,
string suffix )
inline

Keeps observations in a map.

Parameters
scenarioScenario to observe
nodataValue to use for no data
suffixSuffix to use on saved file

Member Function Documentation

◆ getValue()

template<typename T >
virtual T fs::sim::MapObserver< T >::getValue ( const Event & event) const
nodiscardpure virtual

Function that returns the value we care about regarding the Event.

Parameters
event
Returns

Implemented in fs::sim::ArrivalObserver, fs::sim::IntensityObserver, and fs::sim::SourceObserver.

Here is the caller graph for this function:

◆ handleEvent()

template<typename T >
void fs::sim::MapObserver< T >::handleEvent ( const Event & event)
inlineoverridevirtual

Handle given event.

Parameters
eventEvent to handle

Implements fs::sim::IObserver.

Here is the call graph for this function:

◆ reset()

template<typename T >
void fs::sim::MapObserver< T >::reset ( )
inlineoverridevirtualnoexcept

Clear all observations.

Implements fs::sim::IObserver.

◆ save()

template<typename T >
void fs::sim::MapObserver< T >::save ( const string & dir,
const string & base_name ) const
inlineoverridevirtual

Save observations.

Parameters
dirDirectory to save to
base_nameBase file name to save to

Implements fs::sim::IObserver.

Here is the call graph for this function:

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