// SPDX-License-Identifier: GPL-3.0-or-later // Copyright 2019 Juan Palacios #pragma once #include "igpu.h" #include #include #include class IControl; class ISensor; class GPU final : public IGPU { public: GPU(std::unique_ptr &&info, std::vector> &&controls, std::vector> &&sensors) noexcept; bool active() const override; void activate(bool active) override; std::string const &key() const override; std::pair>> componentInfo() const override; void init() override; void preInit(ICommandQueue &ctlCmds) override; void postInit(ICommandQueue &ctlCmds) override; void sync(ICommandQueue &ctlCmds) override; void updateSensors( std::unordered_map> const &ignored) override; IGPUInfo const &info() const override; std::string const &ID() const override; void importWith(Importable::Importer &i) override; void exportWith(Exportable::Exporter &e) const override; private: std::string const id_; std::unique_ptr const info_; std::vector> const controls_; std::vector> const sensors_; std::string key_; bool active_{true}; };