/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #pragma once #include "okapi/api/control/util/settledUtil.hpp" #include "okapi/api/util/abstractRate.hpp" #include "okapi/api/util/abstractTimer.hpp" #include "okapi/api/util/supplier.hpp" namespace okapi { /** * Utility class for holding an AbstractTimer, AbstractRate, and SettledUtil together in one * class since they are commonly used together. */ class TimeUtil { public: TimeUtil(const Supplier> &itimerSupplier, const Supplier> &irateSupplier, const Supplier> &isettledUtilSupplier); std::unique_ptr getTimer() const; std::unique_ptr getRate() const; std::unique_ptr getSettledUtil() const; Supplier> getTimerSupplier() const; Supplier> getRateSupplier() const; Supplier> getSettledUtilSupplier() const; protected: Supplier> timerSupplier; Supplier> rateSupplier; Supplier> settledUtilSupplier; }; } // namespace okapi