|
WSF
|
The WSF scenario extension for cyber. More...
#include <WsfCyberScenarioExtension.hpp>


Public Member Functions | |
| void | AddedToScenario () override |
| bool | ProcessInput (UtInput &aInput) override |
| void | SimulationCreated (WsfSimulation &aSimulation) override |
| AttackTypes & | GetAttackTypes () const |
| EffectTypes & | GetEffectTypes () const |
| ProtectTypes & | GetProtectTypes () const |
| ConstraintTypes & | GetConstraintTypes () const |
| TriggerTypes & | GetTriggerTypes () const |
| Public Member Functions inherited from WsfScenarioExtension | |
| WsfScenarioExtension () | |
| ~WsfScenarioExtension () override | |
| WsfScenario & | GetScenario () const |
| WsfApplication & | GetApplication () const |
| virtual void | FileLoaded (const std::string &aFileName) |
| virtual bool | Complete () |
| virtual bool | Complete2 () |
| virtual bool | AlwaysCreate () |
| Public Member Functions inherited from WsfExtension | |
| virtual | ~WsfExtension ()=default |
| const std::string & | GetExtensionName () const |
Static Public Member Functions | |
| static ScenarioExtension & | Get (const WsfScenario &aScenario) |
| Return a reference to the cyber scenario extension. | |
GetAttackTypeInputRequirement | |
Given the name of the attack and the input requirement being tested, returns a boolean value if any of the effects associated with the attack have the specified input requirement. | |
| AttackTypes * | mAttackTypesPtr |
| EffectTypes * | mEffectTypesPtr |
| ProtectTypes * | mProtectTypesPtr |
| ConstraintTypes * | mConstraintTypesPtr |
| TriggerTypes * | mTriggerTypesPtr |
| bool | mDrawEnabled {false} |
| bool | GetAttackTypeInputRequirement (const std::string &aNamedAttack, Effect::InputRequirement aRequirement) const |
| bool | IsDrawEnabled () const |
Type Existence Queries | |
These methods return if a particular type exists without required knowledge of the types themselves (no needed header) | |
| bool | GetAttackTypeExists (const std::string &aNamedAttack) const |
| bool | GetEffectTypeExists (const std::string &aNamedEffect) const |
| bool | GetProtectTypeExists (const std::string &aNamedProtection) const |
| bool | GetTriggerTypeExists (const std::string &aNamedTrigger) const |
| bool | GetConstraintTypesExists (const std::string &aNamedConstraint) const |
Additional Inherited Members | |
| Protected Member Functions inherited from WsfExtension | |
| void | InitializeExtensionName (const std::string &aName) |
The WSF scenario extension for cyber.
|
overridevirtual |
Called when the extension has been added to the scenario. This is typically used to register new component type objects and object factories, e.g.:
Script classes must NOT be registered here because they are global to the entire application. They should be registered in WsfApplication::AddedToApplication.
Reimplemented from WsfScenarioExtension.
References WsfScenario::AddTypeList(), WsfEventPipeExtension::Find(), WsfScenarioExtension::GetScenario(), mAttackTypesPtr, mConstraintTypesPtr, mEffectTypesPtr, mProtectTypesPtr, mTriggerTypesPtr, wsf::cyber::ConstraintTypes::RegisterComponentFactory(), wsf::cyber::Protect::RegisterComponentFactory(), and wsf::cyber::EventPipe::RegisterEvents().
|
static |
Return a reference to the cyber scenario extension.
References WsfScenario::FindExtension(), WsfScenarioExtension::WsfScenario, and WsfScenarioExtension::WsfScenarioExtension().
Referenced by wsf::cyber::SimulationExtension::AddedToSimulation(), wsf::cyber::EngagementManager::EngagementData::AddEffect(), wsf::cyber::EngagementManager::CyberAttack(), wsf::cyber::EngagementManager::CyberScan(), wsf::cyber::random::RandomManager::Draw(), wsf::cyber::AttackTypes::Get(), wsf::cyber::AttackTypes::Get(), wsf::cyber::ConstraintTypes::Get(), wsf::cyber::ConstraintTypes::Get(), wsf::cyber::EffectTypes::Get(), wsf::cyber::EffectTypes::Get(), wsf::cyber::ProtectTypes::Get(), wsf::cyber::ProtectTypes::Get(), wsf::cyber::SimulationExtension::Initialize(), wsf::cyber::Engagement::MakeConstraintReservations(), wsf::cyber::Engagement::MeetsAttackerConstraints(), wsf::cyber::PlatformScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), wsf::cyber::PlatformScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), wsf::cyber::SimulationScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), and wsf::cyber::SimulationScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
| bool wsf::cyber::ScenarioExtension::GetAttackTypeExists | ( | const std::string & | aNamedAttack | ) | const |
References mAttackTypesPtr.
| bool wsf::cyber::ScenarioExtension::GetAttackTypeInputRequirement | ( | const std::string & | aNamedAttack, |
| Effect::InputRequirement | aRequirement ) const |
References mAttackTypesPtr, and mEffectTypesPtr.
|
inline |
References mAttackTypesPtr.
Referenced by wsf::cyber::AttackTypes::Get(), wsf::cyber::AttackTypes::Get(), and wsf::cyber::SimulationExtension::Initialize().
|
inline |
References mConstraintTypesPtr.
Referenced by wsf::cyber::ConstraintTypes::Get(), and wsf::cyber::ConstraintTypes::Get().
| bool wsf::cyber::ScenarioExtension::GetConstraintTypesExists | ( | const std::string & | aNamedConstraint | ) | const |
References mConstraintTypesPtr.
| bool wsf::cyber::ScenarioExtension::GetEffectTypeExists | ( | const std::string & | aNamedEffect | ) | const |
References mEffectTypesPtr.
|
inline |
References mEffectTypesPtr.
Referenced by wsf::cyber::EffectTypes::Get(), and wsf::cyber::EffectTypes::Get().
| bool wsf::cyber::ScenarioExtension::GetProtectTypeExists | ( | const std::string & | aNamedProtection | ) | const |
References mProtectTypesPtr.
|
inline |
References mProtectTypesPtr.
Referenced by wsf::cyber::ProtectTypes::Get(), and wsf::cyber::ProtectTypes::Get().
| bool wsf::cyber::ScenarioExtension::GetTriggerTypeExists | ( | const std::string & | aNamedTrigger | ) | const |
References mTriggerTypesPtr.
|
inline |
References mTriggerTypesPtr.
|
inline |
References mDrawEnabled.
|
overridevirtual |
Process potential input for the extension. This method examines the current input command to determine if it is one that is recognized by the extension. If it is one recognized by the extension then it processes the command and returns 'true', otherwise it returns 'false'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfScenarioExtension.
References mDrawEnabled.
|
overridevirtual |
Called when a simulation has been created. (Technically this is called upon entry to WsfSimulation::Initialize()). This is typically used when a scenario extension also requires a simulation extension. The method would typically register the simulation extension as follows:
| aSimulation | The simulation that is being created. See note below! |
Reimplemented from WsfScenarioExtension.
References WsfSimulation::RegisterExtension().
| AttackTypes* wsf::cyber::ScenarioExtension::mAttackTypesPtr |
Referenced by AddedToScenario(), GetAttackTypeExists(), GetAttackTypeInputRequirement(), and GetAttackTypes().
| ConstraintTypes* wsf::cyber::ScenarioExtension::mConstraintTypesPtr |
Referenced by AddedToScenario(), GetConstraintTypes(), and GetConstraintTypesExists().
| bool wsf::cyber::ScenarioExtension::mDrawEnabled {false} |
Referenced by IsDrawEnabled(), and ProcessInput().
| EffectTypes* wsf::cyber::ScenarioExtension::mEffectTypesPtr |
Referenced by AddedToScenario(), GetAttackTypeInputRequirement(), GetEffectTypeExists(), and GetEffectTypes().
| ProtectTypes* wsf::cyber::ScenarioExtension::mProtectTypesPtr |
Referenced by AddedToScenario(), GetProtectTypeExists(), and GetProtectTypes().
| TriggerTypes* wsf::cyber::ScenarioExtension::mTriggerTypesPtr |
Referenced by AddedToScenario(), GetTriggerTypeExists(), and GetTriggerTypes().