|
WSF
|
#include <MapPlotVariables.hpp>


Public Types | |
| using | MapPlotVariableMap = std::map<std::string, std::shared_ptr<MapPlotVariable>> |
Public Member Functions | |
| MapPlotVariables () | |
| MapPlotVariables (const MapPlotVariables &)=default | |
| MapPlotVariables & | operator= (const MapPlotVariables &)=default |
| ~MapPlotVariables ()=default | |
| bool | ProcessInput (UtInput &aInput) |
| bool | ProcessScriptVariableInput (const std::string &aVarName, double aVarInitValue) |
| size_t | Count () const |
| void | Evaluate (double aSimTime, WsfSensor *aSensorPtr, WsfSensorResult &aResult, std::vector< double > &aVarValues) |
| bool | Initialize (WsfSimulation &aSimulation) |
| void | InitializeValues (WsfSimulation &aSimulation, std::vector< double > &aVarValues, const std::vector< double > &aUserInitValues) |
| void | AddVariable (const std::string &aVarLabel) |
| const std::string & | GetLabel (size_t aIndex) const |
| size_t | GetLabelPosition (const std::string &aLabel) const |
| void | RegisterMapPlotVariable (const std::string &aVarName, std::shared_ptr< MapPlotVariable > aVariablePtr) |
| Public Member Functions inherited from MapPlotVariable::SharedData | |
| void | SetCrossRange (double aCrossRange) |
| Set accessor for private member data mCrossRange. | |
| void | SetDownRange (double aDownRange) |
| Set accessor for private member data mDownRange. | |
| void | SetRangeScale (double aRangeScale) |
| Set accessor for private member data mRangeScale. | |
| double | GetCrossRange () const |
| Get accessor for private member data mCrossRange. | |
| double | GetDownRange () const |
| Get accessor for private member data mDownRange. | |
| double | GetRangeScale () const |
| Get accessor for private member data mRangeScale. | |
Static Public Member Functions | |
| static bool | CheckSucceeded (WsfSensorResult &aResult) |
A class that defines plot variables that are common between horizontal and vertical maps.
The horizontal_map and vertical_map functions have many plot variables in common. Rather than replicated the code, this provides the processing that can be shared.
| using MapPlotVariables::MapPlotVariableMap = std::map<std::string, std::shared_ptr<MapPlotVariable>> |
| MapPlotVariables::MapPlotVariables | ( | ) |
References RegisterMapPlotVariable().
Referenced by MapPlotVariables(), and operator=().
|
default |
References MapPlotVariables().
|
default |
References ProcessScriptVariableInput().
| void MapPlotVariables::AddVariable | ( | const std::string & | aVarLabel | ) |
Adds a new map plot variable ID to mVarLabels. ID must already be present in mVariableMap.
| aVarLabel | the ID of the new map plot variable, added to the end of mVarLabels. |
Referenced by Initialize(), and ProcessScriptVariableInput().
|
static |
Status checker function.
| aResult | Subject result to be evaluated |
References WsfEM_Interaction::mCheckedStatus, and WsfEM_Interaction::mFailedStatus.
|
inline |
Return the number of variables defined.
| void MapPlotVariables::Evaluate | ( | double | aSimTime, |
| WsfSensor * | aSensorPtr, | ||
| WsfSensorResult & | aResult, | ||
| std::vector< double > & | aVarValues ) |
Calls the MapPlotVariable::Evaluate in each instance of MapPlotVariable derived classes.
| aSimTime | Current simulation time, internal. |
| aSensorPtr | A pointer to the sensor object undergoing evaluation. |
| aResult | Resultant value of previous sensor process. |
| aVarValues | Initial value for a given evaluation. |
|
inline |
Get the MapPlotVariable ID (label) at a given index.
| aIndex | Index of the desired ID. |
| size_t MapPlotVariables::GetLabelPosition | ( | const std::string & | aLabel | ) | const |
Get the MapPlotVariable Index at a given ID (label)
| aLabel | Label of the desired index. |
| bool MapPlotVariables::Initialize | ( | WsfSimulation & | aSimulation | ) |
Initializes member variables in MapPlotVariable derived classes.
| aSimulation | The currently active simulation. |
References AddVariable(), and ok.
| void MapPlotVariables::InitializeValues | ( | WsfSimulation & | aSimulation, |
| std::vector< double > & | aVarValues, | ||
| const std::vector< double > & | aUserInitValues ) |
Initializes dynamic member values in MapPlotVariable derived classes.
| aSimulation | The currently active simulation. |
| aVarValues | A vector containing variable values for each derived class. |
| aUserInitValues | Initialization values. |
|
default |
References MapPlotVariables().
| bool MapPlotVariables::ProcessInput | ( | UtInput & | aInput | ) |
Check if UtInput contains a script block type defined by this extension and if so processes the data.
| aInput | Check and process this block of script. |
| bool MapPlotVariables::ProcessScriptVariableInput | ( | const std::string & | aVarName, |
| double | aVarInitValue ) |
Add a user defined script variable to the master list (MapPlotVariableMap) and add its name to mVarLabels
| aVarName | The name of the script variable. |
| aVarInitValue | The initial value for the script variable. |
References AddVariable(), and RegisterMapPlotVariable().
Referenced by ~MapPlotVariables().
| void MapPlotVariables::RegisterMapPlotVariable | ( | const std::string & | aVarName, |
| std::shared_ptr< MapPlotVariable > | aVariablePtr ) |
Registration of new Map Plot Variables.
| aVarName | The name of the variable Label |
| aVariablePtr | Pointer to MapPlotVariable derived class instance mapped by variable label |
Referenced by MapPlotVariables(), and ProcessScriptVariableInput().