|
WSF
|
#include <WsfCyberAttackParameters.hpp>
Inherits UtScriptAccessible.
Public Types | |
| using | ParameterMap = std::unordered_map<std::string, std::vector<AttackParameterObject>> |
Public Member Functions | |
| AttackParameters ()=default | |
| ~AttackParameters () override=default | |
| virtual AttackParameters * | Clone () const |
| const char * | GetScriptClassName () const override |
| std::vector< std::string > | GetEffectNames () const |
| const std::vector< AttackParameterObject > * | GetEffectEntries (const std::string &aEffectName) const |
| size_t | GetEffectEntryCount (const std::string &aEffectName) const |
| AttackParameterObject * | GetEffectEntryByIndex (const std::string &aEffectName, size_t aIndex) |
| void | AddParameter (const AttackParameterObject &aParameter) |
The AttackParameters class is a container for various variables provided with a cyber attack. These variables are intended for use with the effects associated with an attack. Because cyber attacks may instantiate multiple effects, this container associates each set of parameters with an effect. Thus, at the time that an effect is instantiated during an attack, any required variables necessary for that effect can be retrieved from this container.
Entries for each effect in this container are wrapped aux data. Aux data is always provided a string identifier. In this class, that identifier must correspond to the name of the effect the data is associated with.
| using wsf::cyber::AttackParameters::ParameterMap = std::unordered_map<std::string, std::vector<AttackParameterObject>> |
|
default |
Referenced by Clone(), and GetEffectNames().
|
overridedefault |
| void wsf::cyber::AttackParameters::AddParameter | ( | const AttackParameterObject & | aParameter | ) |
Adds a parameter. Each parameter is a wrapped aux-data object (AttackParameterObject) that consists of a SINGLE variable associated with a string name corresponding to the effect name the parameter is valid for.
Any AttackParameterObject that contains multiple variables are ignored. If multiple parameters are required, they should be added individually. Objects (such as structs, maps, or other AFSIM objects) are considered to be a single parameter (see how aux is implemented for details)
In addition, any effect that requires more than one user supplied variable must be packed in the exact order that such data is expected to be consumed.
References WsfAuxDataEnabled::GetAuxDataConst().
|
inlinevirtual |
References AttackParameters().
| const std::vector< AttackParameterObject > * wsf::cyber::AttackParameters::GetEffectEntries | ( | const std::string & | aEffectName | ) | const |
| AttackParameterObject * wsf::cyber::AttackParameters::GetEffectEntryByIndex | ( | const std::string & | aEffectName, |
| size_t | aIndex ) |
| size_t wsf::cyber::AttackParameters::GetEffectEntryCount | ( | const std::string & | aEffectName | ) | const |
| std::vector< std::string > wsf::cyber::AttackParameters::GetEffectNames | ( | ) | const |
References AttackParameters(), and GetEffectNames().
Referenced by GetEffectNames(), and wsf::cyber::UT_DEFINE_SCRIPT_METHOD().
|
inlineoverride |