37 lines
854 B
C++
37 lines
854 B
C++
/*
|
|
* Copyright (c) 2025 Fraunhofer IESE. All rights reserved.
|
|
*
|
|
* Authors:
|
|
* Iron Prando da Silva
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "businessObjects/dramTimeDependencies/common/common.h"
|
|
|
|
typedef std::pair<StringMapper, uint> PoolEntry;
|
|
|
|
class PoolController
|
|
{
|
|
public:
|
|
PoolController(const uint poolSize, const std::vector<PoolEntry>& dependencies);
|
|
~PoolController() = default;
|
|
|
|
void clear();
|
|
void push(DBDependencyEntry);
|
|
void increment();
|
|
void merge(std::vector<DBDependencyEntry>& depEntries);
|
|
size_t count() { return mCount; }
|
|
|
|
uint getBusyTime(const StringMapper& phaseName);
|
|
|
|
protected:
|
|
const std::vector<PoolEntry> mDependencies;
|
|
std::vector<DBDependencyEntry> mPool;
|
|
uint mCount = 0;
|
|
uint mPoolSize = 0;
|
|
|
|
protected:
|
|
static std::vector<PoolEntry> mAuxSortInput(std::vector<PoolEntry> vec);
|
|
};
|