/* * SPDX-FileCopyrightText: 2018 Rerrah * SPDX-License-Identifier: MIT */ #pragma once #include #include #include "../abstract_command.hpp" #include "instrument.hpp" #include "instruments_manager.hpp" class AddInstrumentCommand final : public AbstractCommand { public: AddInstrumentCommand(std::weak_ptr manager, int num, InstrumentType type, const std::string& name); AddInstrumentCommand(std::weak_ptr manager, std::unique_ptr inst); bool redo() override; bool undo() override; private: std::weak_ptr manager_; int num_; InstrumentType type_; std::string name_; std::unique_ptr inst_; };