/* * Copyright (c) 2025 Fraunhofer IESE. All rights reserved. * * Authors: * Iron Prando da Silva */ #pragma once #include "StringMapper.h" #include #include class DBPhaseEntryBase; #define PASSFUNCTIONDECL \ ([[maybe_unused]] const std::shared_ptr thisPhase, \ [[maybe_unused]] const std::shared_ptr otherPhase) struct PassFunction { using Fn = std::function< bool(const std::shared_ptr&, const std::shared_ptr&)>; explicit PassFunction(Fn passFunction) : mPassFn{std::move(passFunction)} {} bool execute PASSFUNCTIONDECL { return mPassFn(thisPhase, otherPhase); } Fn mPassFn; }; class TimeDependency { public: TimeDependency() = default; TimeDependency(size_t timeValue, QString phaseDep, DependencyType depType, QString timeDepName, std::shared_ptr pass = nullptr) : timeValue{timeValue}, phaseDep{phaseDep}, depType{depType}, timeDepName{timeDepName}, passFunction{pass} { } size_t timeValue; StringMapper phaseDep; DependencyType depType; QString timeDepName; std::shared_ptr passFunction; bool isPool() { return phaseDep.isPool(); } };