12#ifndef WSFQUANTUMALLOCATOR_HPP
13#define WSFQUANTUMALLOCATOR_HPP
15#include "wsf_mil_export.h"
21#include "UtCloneablePtr.hpp"
22#include "UtMemory.hpp"
23#include "UtOptimalAssignment.hpp"
26class UtScriptExecutor;
32using AllocationList = std::vector<std::pair<WsfAssetPerception*, ut::CloneablePtr<WsfQuantumTask>>>;
80 bool Register(std::unique_ptr<WsfQuantumAllocator> aAllocatorPtr);
82 const std::map<std::string, ut::CloneablePtr<WsfQuantumAllocator>>&
Allocators()
const {
return mFactoryMap; }
88 std::map<std::string, ut::CloneablePtr<WsfQuantumAllocator>> mFactoryMap;
99 virtual bool Valid() {
return (mScriptPtr !=
nullptr); }
107 UtScript* mScriptPtr;
108 UtScriptContext* mContextPtr;
109 UtScriptExecutor* mExecutorPtr;
185 UtOptimalAssignment mOptimalAssigner;
std::vector< std::pair< WsfAssetPerception *, ut::CloneablePtr< WsfQuantumTask > > > AllocationList
Definition WsfQuantumAllocator.hpp:32
Definition WsfAssetPerception.hpp:32
Definition WsfQuantumAllocator.hpp:72
bool Register(std::unique_ptr< WsfQuantumAllocator > aAllocatorPtr)
Definition WsfQuantumAllocator.cpp:64
WsfQuantumAllocatorFactory(WsfQuantumAllocatorFactory &&aSrc)=delete
WsfQuantumAllocatorFactory & operator=(const WsfQuantumAllocatorFactory &)=delete
WsfQuantumAllocatorFactory & operator=(WsfQuantumAllocatorFactory &&)=delete
~WsfQuantumAllocatorFactory()=default
const std::map< std::string, ut::CloneablePtr< WsfQuantumAllocator > > & Allocators() const
Definition WsfQuantumAllocator.hpp:82
static WsfQuantumAllocatorFactory * Instance()
Definition WsfQuantumAllocator.cpp:58
WsfQuantumAllocator * CreateAllocator(const std::string &allocatorName)
Definition WsfQuantumAllocator.cpp:73
WsfQuantumAllocator * Clone() override
Definition WsfQuantumAllocator.hpp:131
~WsfQuantumAllocatorGreedyIsolated() override=default
WsfQuantumAllocatorGreedyIsolated()=default
std::string AllocatorType() override
Definition WsfQuantumAllocator.hpp:130
~WsfQuantumAllocatorGreedyPriority() override=default
std::string AllocatorType() override
Definition WsfQuantumAllocator.hpp:143
WsfQuantumAllocator * Clone() override
Definition WsfQuantumAllocator.hpp:144
WsfQuantumAllocatorGreedyPriority()=default
WsfQuantumAllocator * Clone() override
Definition WsfQuantumAllocator.hpp:168
std::string AllocatorType() override
Definition WsfQuantumAllocator.hpp:167
~WsfQuantumAllocatorGreedyProfit() override=default
WsfQuantumAllocatorGreedyProfit()=default
WsfQuantumAllocator * Clone() override
Definition WsfQuantumAllocator.hpp:156
~WsfQuantumAllocatorGreedyValue() override=default
WsfQuantumAllocatorGreedyValue()=default
std::string AllocatorType() override
Definition WsfQuantumAllocator.hpp:155
~WsfQuantumAllocatorOptimalProfit() override=default
WsfQuantumAllocator * Clone() override
Definition WsfQuantumAllocator.hpp:181
std::string AllocatorType() override
Definition WsfQuantumAllocator.hpp:180
WsfQuantumAllocatorOptimalProfit()=default
Definition WsfQuantumAllocator.hpp:92
WsfQuantumAllocator * Clone() override
Definition WsfQuantumAllocator.hpp:97
virtual bool Valid()
Definition WsfQuantumAllocator.hpp:99
~WsfQuantumAllocatorScript() override=default
void Initialize(double aSimTime, WsfScriptContext *aParentContextPtr=nullptr) override
Definition WsfQuantumAllocator.cpp:113
WsfQuantumAllocatorScript(WsfScriptContext *aContextPtr, std::string &aScriptMethod)
Definition WsfQuantumAllocator.cpp:83
std::string AllocatorType() override
Definition WsfQuantumAllocator.hpp:98
std::string AllocatorType() override
Definition WsfQuantumAllocator.hpp:118
~WsfQuantumAllocatorSimple() override=default
WsfQuantumAllocator * Clone() override
Definition WsfQuantumAllocator.hpp:119
WsfQuantumAllocatorSimple()=default
Definition WsfQuantumAllocator.hpp:36
virtual void Initialize(double aSimTime, WsfScriptContext *aParentContextPtr=nullptr)
Definition WsfQuantumAllocator.hpp:54
WsfQuantumAllocator()=default
void SetTaskType(std::string &aType)
Definition WsfQuantumAllocator.hpp:63
std::string mTaskType
Definition WsfQuantumAllocator.hpp:66
virtual WsfAssetPerception * AllocatedTo(WsfQuantumTask *aTaskPtr)
Definition WsfQuantumAllocator.cpp:37
virtual AllocationList MakeAllocations(WsfQuantumMatrix &aMatrix)=0
std::map< WsfQuantumTask *, WsfAssetPerception * > mTaskAllocationMap
Definition WsfQuantumAllocator.hpp:68
virtual std::string AllocatorType()=0
virtual ~WsfQuantumAllocator()=default
WsfQuantumAllocator & operator=(const WsfQuantumAllocator &)=default
virtual WsfQuantumTask * AllocationFor(WsfAssetPerception *aAssetPtr)
Definition WsfQuantumAllocator.cpp:26
virtual WsfQuantumAllocator * Clone()=0
std::string TaskType()
Definition WsfQuantumAllocator.hpp:61
std::map< WsfAssetPerception *, WsfQuantumTask * > mAssetAllocationMap
Definition WsfQuantumAllocator.hpp:67
bool HasTaskType()
Definition WsfQuantumAllocator.hpp:62
Definition WsfQuantumMatrix.hpp:25
Definition WsfQuantumTask.hpp:85
Definition WsfScriptContext.hpp:71