|
WSF
|
A singleton class that manages SOSM data. More...
#include <SOSM_Manager.hpp>

Public Member Functions | |
| SOSM_Manager (const UtAtmosphere &aAtmosphere) | |
| ~SOSM_Manager () | |
| void | Load (const std::string &aFileName) |
| void | Load (UtInput &aInput) |
| bool | ProcessInput (UtInput &aInput) |
| UtAtmosphere & | GetUtAtmosphere () |
| SOSM_Atmosphere * | AllocateDefaultAtmosphere () |
| SOSM_SensorTarget * | AllocateSensorTargetPair (const std::string &aSensorType, const std::string &aTargetType) |
| SOSM_Atmosphere * | AllocateAtmosphere (const std::string &aTypeName) |
| SOSM_Sensor * | AllocateSensor (const std::string &aTypeName) |
| SOSM_Target * | AllocateTarget (const std::string &aTypeName) |
| SOSM_Atmosphere * | FindAtmosphereType (const std::string &aTypeName) |
| SOSM_Sensor * | FindSensorType (const std::string &aTypeName) |
| SOSM_Target * | FindTargetType (const std::string &aTypeName) |
| SOSM_Atmosphere * | LoadAtmosphereType (const std::string &aTypeName, const std::string &aFileName) |
| SOSM_Atmosphere * | LoadAtmosphereType (const std::string &aTypeName, const std::string &aCachePrefix, UtInput &aInput) |
| SOSM_Sensor * | LoadSensorType (const std::string &aTypeName, const std::string &aFileName) |
| SOSM_Sensor * | LoadSensorType (const std::string &aTypeName, const std::string &aCachePrefix, UtInput &aInput) |
| SOSM_Target * | LoadTargetType (const std::string &aTypeName, const std::string &aFileName) |
| SOSM_Target * | LoadTargetType (const std::string &aTypeName, const std::string &aCachePrefix, UtInput &aInput) |
| std::string & | CacheDirectory () |
| Return the name of the cache directory. | |
| bool | IgnoreCacheFiles () |
| Indicate if cached binary files should be ignored. | |
| bool | WriteCacheFiles () |
| Indicate if cached binary files should be created. | |
| bool | ShowStatus () |
| Indicate if status messages should be shown during file loading. | |
| bool | UseFastDetectionMode () |
| int | DebugLevel () |
| Return the debug level (<= 0 if no debugging). | |
| bool | ShowIRIPP_Data () |
| Return true if IRIPP comparison data is to be shown. | |
Utility routines to assist is pre-allocation of fast-detection mode tables. | |
| typedef std::map< std::string, SOSM_Atmosphere * > | AtmosphereTypes |
| typedef std::map< std::string, SOSM_Sensor * > | SensorTypes |
| typedef std::map< std::string, SOSM_Target * > | TargetTypes |
| UtAtmosphere | mUtAtmosphere |
| AtmosphereTypes | mAtmosphereTypes |
| SensorTypes | mSensorTypes |
| TargetTypes | mTargetTypes |
| std::string | mDefaultAtmosphereType |
| std::string | mCacheDirectory |
| int | mDebugLevel |
| bool | mIgnoreCacheFiles |
| bool | mWriteCacheFiles |
| bool | mUseFastDetectionMode |
| bool | mShowStatus |
| bool | mShowIRIPP_Data |
| SOSM_TestCommands * | mTestCommandsPtr |
| void | GetSensorTypes (std::vector< std::string > &aTypes) const |
| void | GetTargetTypes (std::vector< std::string > &aTypes) const |
| bool | PreallocatePair (const std::string &aSensorType, const std::string &aTargetType) |
| bool | PreallocateAllPairs () |
| SOSM_Manager (const SOSM_Manager &aSrc) | |
| SOSM_Manager | operator= (const SOSM_Manager &aRhs)=delete |
| std::string | GetCachePrefix (const std::string &aFileName) |
| void | LoadFromStream (UtInput &aInput) |
| void | LoadType (SOSM_CoreBase *aTypePtr, UtInput &aInput) |
| bool | ReadCommand (UtInput &aInput, std::string &aCommand) |
| void | TestDriver (UtInput &aInput) |
File referenced notification. | |
The following exists to provide the controlling simulation a method to receive notification when the model references a file. | |
| UtCallbackListN< void(const std::string &)> | FileReferenced |
| std::string | CacheFileName (const std::string &aTextFileName, const std::string &aCachePrefix) |
A singleton class that manages SOSM data.
|
protected |
|
protected |
|
protected |
| SOSM_Manager::SOSM_Manager | ( | const UtAtmosphere & | aAtmosphere | ) |
References mAtmosphereTypes, mCacheDirectory, mDebugLevel, mIgnoreCacheFiles, mSensorTypes, mShowIRIPP_Data, mShowStatus, mTargetTypes, mTestCommandsPtr, mUseFastDetectionMode, mUtAtmosphere, and mWriteCacheFiles.
Referenced by operator=(), and SOSM_Manager().
| SOSM_Manager::~SOSM_Manager | ( | ) |
References mAtmosphereTypes, mSensorTypes, mTargetTypes, and mTestCommandsPtr.
|
protected |
References SOSM_Manager().
| SOSM_Atmosphere * SOSM_Manager::AllocateAtmosphere | ( | const std::string & | aTypeName | ) |
Allocate an instance of an atmosphere object.
| aTypeName | The name of the atmosphere type for which an instance is desired. |
References SOSM_Atmosphere::Clone(), FindAtmosphereType(), and SOSM_CoreBase::Initialize().
Referenced by AllocateDefaultAtmosphere().
| SOSM_Atmosphere * SOSM_Manager::AllocateDefaultAtmosphere | ( | ) |
Return a pointer to a new instance of the default atmosphere.
References AllocateAtmosphere(), and mDefaultAtmosphereType.
| SOSM_Sensor * SOSM_Manager::AllocateSensor | ( | const std::string & | aTypeName | ) |
Allocate an instance of an sensor object.
| aTypeName | The name of the sensor type for which an instance is desired. |
References SOSM_Sensor::Clone(), FindSensorType(), and SOSM_Sensor::Initialize().
| SOSM_SensorTarget * SOSM_Manager::AllocateSensorTargetPair | ( | const std::string & | aSensorType, |
| const std::string & | aTargetType ) |
Create a sensor/target pairing object for the specified sensor and target types.
| aSensorType | The type of the sensor. |
| aTargetType | The type of the target. |
References SOSM_SensorTarget::Initialize().
Referenced by WsfSOSM_Sensor::SOSM_Mode::AttemptToDetect().
| SOSM_Target * SOSM_Manager::AllocateTarget | ( | const std::string & | aTypeName | ) |
Allocate an instance of an target object.
| aTypeName | The name of the target type for which an instance is desired. |
References SOSM_Target::Clone(), FindTargetType(), and SOSM_Target::Initialize().
|
inline |
| std::string SOSM_Manager::CacheFileName | ( | const std::string & | aTextFileName, |
| const std::string & | aCachePrefix ) |
Return the name of the cache file that is associated with an indicated text file. This will also ensure the cache directory is created.
References SOSM_Utility::BaseName(), CacheDirectory(), and SOSM_Utility::MakePath().
Referenced by SOSM_SpectralTable2D::Load(), and SOSM_SpectralTable3D::Load().
|
inline |
Return the debug level (<= 0 if no debugging).
References mDebugLevel.
| SOSM_Atmosphere * SOSM_Manager::FindAtmosphereType | ( | const std::string & | aTypeName | ) |
References mAtmosphereTypes.
Referenced by AllocateAtmosphere().
| SOSM_Sensor * SOSM_Manager::FindSensorType | ( | const std::string & | aTypeName | ) |
References mSensorTypes.
Referenced by AllocateSensor(), and WsfSOSM_Sensor::SOSM_Mode::Initialize().
| SOSM_Target * SOSM_Manager::FindTargetType | ( | const std::string & | aTypeName | ) |
References mTargetTypes.
Referenced by AllocateTarget().
|
protected |
References SOSM_Utility::BaseName().
Referenced by LoadAtmosphereType(), LoadSensorType(), LoadTargetType(), and operator=().
| void SOSM_Manager::GetSensorTypes | ( | std::vector< std::string > & | aTypes | ) | const |
References mSensorTypes.
Referenced by PreallocateAllPairs().
| void SOSM_Manager::GetTargetTypes | ( | std::vector< std::string > & | aTypes | ) | const |
References mTargetTypes.
Referenced by PreallocateAllPairs().
| UtAtmosphere & SOSM_Manager::GetUtAtmosphere | ( | ) |
References mUtAtmosphere.
|
inline |
Indicate if cached binary files should be ignored.
References mIgnoreCacheFiles.
| void SOSM_Manager::Load | ( | const std::string & | aFileName | ) |
Process a file containing SOSM commands.
| aFileName | The name of the file to be processed. |
| Various | exceptions if an input error occurs. |
References FileReferenced, and Load().
Referenced by Load().
| void SOSM_Manager::Load | ( | UtInput & | aInput | ) |
Process a stream containing SOSM commands.
| aInput | The input stream to be processed. |
| Various | exceptions if an input error occurs. |
References ProcessInput(), and ReadCommand().
| SOSM_Atmosphere * SOSM_Manager::LoadAtmosphereType | ( | const std::string & | aTypeName, |
| const std::string & | aCachePrefix, | ||
| UtInput & | aInput ) |
| SOSM_Atmosphere * SOSM_Manager::LoadAtmosphereType | ( | const std::string & | aTypeName, |
| const std::string & | aFileName ) |
References SOSM_Utility::FileModificationTime(), FileReferenced, GetCachePrefix(), LoadAtmosphereType(), and SOSM_CoreBase::UpdateModificationTime().
Referenced by LoadAtmosphereType(), and ProcessInput().
|
protected |
References LoadType(), and ReadCommand().
| SOSM_Sensor * SOSM_Manager::LoadSensorType | ( | const std::string & | aTypeName, |
| const std::string & | aCachePrefix, | ||
| UtInput & | aInput ) |
References LoadType(), mSensorTypes, SOSM_CoreBase::SetCachePrefix(), and SOSM_CoreBase::SetTypeName().
| SOSM_Sensor * SOSM_Manager::LoadSensorType | ( | const std::string & | aTypeName, |
| const std::string & | aFileName ) |
References SOSM_Utility::FileModificationTime(), FileReferenced, GetCachePrefix(), LoadSensorType(), and SOSM_CoreBase::UpdateModificationTime().
Referenced by LoadSensorType(), and ProcessInput().
| SOSM_Target * SOSM_Manager::LoadTargetType | ( | const std::string & | aTypeName, |
| const std::string & | aCachePrefix, | ||
| UtInput & | aInput ) |
References LoadType(), mTargetTypes, SOSM_CoreBase::SetCachePrefix(), and SOSM_CoreBase::SetTypeName().
| SOSM_Target * SOSM_Manager::LoadTargetType | ( | const std::string & | aTypeName, |
| const std::string & | aFileName ) |
References SOSM_Utility::FileModificationTime(), FileReferenced, GetCachePrefix(), LoadTargetType(), and SOSM_CoreBase::UpdateModificationTime().
Referenced by LoadTargetType(), and ProcessInput().
|
protected |
References SOSM_CoreBase::GetTypeName(), SOSM_CoreBase::InputComplete(), and SOSM_CoreBase::ProcessInput().
Referenced by LoadAtmosphereType(), LoadFromStream(), LoadSensorType(), and LoadTargetType().
|
protecteddelete |
References GetCachePrefix(), and SOSM_Manager().
| bool SOSM_Manager::PreallocateAllPairs | ( | ) |
Pre-allocate all sensor/target fast detection mode tables (If fast detection mode enabled). This is typically used to ensure all data is pre-computed for real-time operation.
References GetSensorTypes(), GetTargetTypes(), ok, PreallocatePair(), and UseFastDetectionMode().
Referenced by ProcessInput().
| bool SOSM_Manager::PreallocatePair | ( | const std::string & | aSensorType, |
| const std::string & | aTargetType ) |
References ok, and UseFastDetectionMode().
Referenced by PreallocateAllPairs(), and ProcessInput().
| bool SOSM_Manager::ProcessInput | ( | UtInput & | aInput | ) |
References SOSM_Utility::cSPF_WAVELENGTH, SOSM_Utility::cSPF_WAVENUMBER, LoadAtmosphereType(), LoadSensorType(), LoadTargetType(), mCacheDirectory, mDebugLevel, mDefaultAtmosphereType, mIgnoreCacheFiles, mShowIRIPP_Data, mShowStatus, mTestCommandsPtr, mUseFastDetectionMode, mWriteCacheFiles, PreallocateAllPairs(), PreallocatePair(), and SOSM_Utility::SetSpectralPrintFormat().
Referenced by Load().
|
protected |
Referenced by Load(), and LoadFromStream().
|
inline |
Return true if IRIPP comparison data is to be shown.
References mShowIRIPP_Data.
|
inline |
Indicate if status messages should be shown during file loading.
References mShowStatus.
|
protected |
|
inline |
Indicate if the 'fast detection mode' should be used. The 'fast detection model' uses pre-computed values which have already been spectrally integrated.
References mUseFastDetectionMode.
Referenced by PreallocateAllPairs(), and PreallocatePair().
|
inline |
Indicate if cached binary files should be created.
References mWriteCacheFiles.
| UtCallbackListN<void(const std::string&)> SOSM_Manager::FileReferenced |
|
protected |
Referenced by FindAtmosphereType(), LoadAtmosphereType(), SOSM_Manager(), and ~SOSM_Manager().
|
protected |
Referenced by CacheDirectory(), ProcessInput(), and SOSM_Manager().
|
protected |
Referenced by DebugLevel(), ProcessInput(), and SOSM_Manager().
|
protected |
Referenced by AllocateDefaultAtmosphere(), LoadAtmosphereType(), and ProcessInput().
|
protected |
Referenced by IgnoreCacheFiles(), ProcessInput(), and SOSM_Manager().
|
protected |
Referenced by FindSensorType(), GetSensorTypes(), LoadSensorType(), SOSM_Manager(), and ~SOSM_Manager().
|
protected |
Referenced by ProcessInput(), ShowIRIPP_Data(), and SOSM_Manager().
|
protected |
Referenced by ProcessInput(), ShowStatus(), and SOSM_Manager().
|
protected |
Referenced by FindTargetType(), GetTargetTypes(), LoadTargetType(), SOSM_Manager(), and ~SOSM_Manager().
|
protected |
Referenced by ProcessInput(), SOSM_Manager(), and ~SOSM_Manager().
|
protected |
Referenced by ProcessInput(), SOSM_Manager(), and UseFastDetectionMode().
|
protected |
Referenced by GetUtAtmosphere(), LoadAtmosphereType(), and SOSM_Manager().
|
protected |
Referenced by ProcessInput(), SOSM_Manager(), and WriteCacheFiles().