Debian Codegraph @

BambooTracker/command/order/set_pattern_to_order_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 "module.hpp"
11
12 class SetPatternToOrderCommand final : public AbstractCommand
13 {
14 public:
15 SetPatternToOrderCommand(std::weak_ptr<Module> mod, int songNum, int trackNum,
16 int orderNum, int patternNum, bool secondEntry);
17 bool redo() override;
18 bool undo() override;
19 bool mergeWith(const AbstractCommand* other) override;
20
21 private:
22 std::weak_ptr<Module> mod_;
23 const int song_, track_, order_;
24 int pattern_;
25 const int prevPattern_;
26 bool isSecondEntry_;
27 };