WSF
wsf::cyber::AttackParameters Class Reference

#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 AttackParametersClone () 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
AttackParameterObjectGetEffectEntryByIndex (const std::string &aEffectName, size_t aIndex)
void AddParameter (const AttackParameterObject &aParameter)

Detailed Description

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.

Member Typedef Documentation

◆ ParameterMap

using wsf::cyber::AttackParameters::ParameterMap = std::unordered_map<std::string, std::vector<AttackParameterObject>>

Constructor & Destructor Documentation

◆ AttackParameters()

wsf::cyber::AttackParameters::AttackParameters ( )
default

Referenced by Clone(), and GetEffectNames().

◆ ~AttackParameters()

wsf::cyber::AttackParameters::~AttackParameters ( )
overridedefault

Member Function Documentation

◆ AddParameter()

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().

◆ Clone()

virtual AttackParameters * wsf::cyber::AttackParameters::Clone ( ) const
inlinevirtual

References AttackParameters().

◆ GetEffectEntries()

const std::vector< AttackParameterObject > * wsf::cyber::AttackParameters::GetEffectEntries ( const std::string & aEffectName) const

◆ GetEffectEntryByIndex()

AttackParameterObject * wsf::cyber::AttackParameters::GetEffectEntryByIndex ( const std::string & aEffectName,
size_t aIndex )

◆ GetEffectEntryCount()

size_t wsf::cyber::AttackParameters::GetEffectEntryCount ( const std::string & aEffectName) const

◆ GetEffectNames()

std::vector< std::string > wsf::cyber::AttackParameters::GetEffectNames ( ) const

◆ GetScriptClassName()

const char * wsf::cyber::AttackParameters::GetScriptClassName ( ) const
inlineoverride

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved