12#ifndef WSFCYBERCONSTRAINT_HPP
13#define WSFCYBERCONSTRAINT_HPP
15#include "wsf_cyber_export.h"
19#include "UtRandom.hpp"
20#include "UtScriptBasicTypes.hpp"
46 const int* GetComponentRoles()
const override;
48 void* QueryInterface(
int aRole)
override;
55 bool ProcessInput(UtInput& aInput)
override;
61 size_t GetConcurrentAttacks(
const std::string& aAttackType)
const;
62 void AddConcurrentAttack(
const std::string& aAttackType,
size_t aEngagementID);
63 void RemoveConcurrentAttack(
const std::string& aAttackType,
size_t aEngagementID);
64 void AddAttackTime(
const std::string& aAttackType,
double aSimTime);
65 size_t GetAttackCountAfterTime(
const std::string& aAttackType,
double aSimTime)
const;
72 bool RestoreResources(
double aQuantity);
73 bool RemoveResources(
double aQuantity);
79 std::vector<size_t> mConcurrentEngagements;
82 std::multiset<double> mAttackTimes;
85 std::map<std::string, AttackInfo> mAttackData;
87 double mResources{0.0};
88 double mTotalResources{0.0};
89 bool mDefaultDefined{
false};
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
WsfComponentT< WsfPlatform > WsfPlatformComponent
A convenient typedef for a platform component.
Definition WsfComponent.hpp:171
@ cWSF_COMPONENT_CYBER_CONSTRAINT
Definition WsfCyberComponentRoles.hpp:20
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfComponent.hpp:39
WsfStringId GetNameId() const
Definition WsfObject.hpp:66
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
WsfScriptObjectClass(const std::string &aClassName, UtScriptTypes *aTypesPtr)
Definition WsfScriptObjectClass.cpp:24
Definition WsfCyberConstraint.hpp:39
double GetCurrentResources() const
Definition WsfCyberConstraint.hpp:70
Constraint * Clone() const override
Definition WsfCyberConstraint.hpp:56
WsfStringId GetComponentName() const override
Definition WsfCyberConstraint.hpp:45
Constraint()
Definition WsfCyberConstraint.cpp:26
double GetTotalResources() const
Definition WsfCyberConstraint.hpp:71
UT_DECLARE_SCRIPT_METHOD(ConcurrentAttacks)
UT_DECLARE_SCRIPT_METHOD(TotalResources)
UT_DECLARE_SCRIPT_METHOD(CurrentResources)
UT_DECLARE_SCRIPT_METHOD(AttackCountAfterTime)
ScriptConstraintClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfCyberConstraint.cpp:187
Definition WsfCyberApplicationExtension.cpp:24
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32