Debian Codegraph @

BambooTracker/command/instrument/change_instrument_name_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 <string>
10 #include "../abstract_command.hpp"
11 #include "instruments_manager.hpp"
12
13 class ChangeInstrumentNameCommand final : public AbstractCommand
14 {
15 public:
16 ChangeInstrumentNameCommand(std::weak_ptr<InstrumentsManager> manager,
17 int num, const std::string& name);
18 bool redo() override;
19 bool undo() override;
20
21 private:
22 std::weak_ptr<InstrumentsManager> manager_;
23 int instNum_;
24 std::string oldName_, newName_;
25 };