Debian Codegraph @

BambooTracker/command/instrument/remove_instrument_command.hpp

raw
1 /*
2 * SPDX-FileCopyrightText: 2018 Rerrah
3 * SPDX-License-Identifier: MIT
4 */
5
6 #pragma once
7
8 #include <memory>
9 #include "../abstract_command.hpp"
10 #include "instruments_manager.hpp"
11 #include "instrument.hpp"
12
13 class RemoveInstrumentCommand final : public AbstractCommand
14 {
15 public:
16 RemoveInstrumentCommand(std::weak_ptr<InstrumentsManager> manager, int number);
17 bool redo() override;
18 bool undo() override;
19
20 private:
21 std::weak_ptr<InstrumentsManager> manager_;
22 int number_;
23 std::unique_ptr<AbstractInstrument> inst_;
24 };