Debian Codegraph @

BambooTracker/command/pattern/change_values_in_pattern_command.hpp

raw
1 /*
2 * SPDX-FileCopyrightText: 2020 Rerrah
3 * SPDX-License-Identifier: MIT
4 */
5
6 #pragma once
7
8 #include <memory>
9 #include <vector>
10 #include "../abstract_command.hpp"
11 #include "module.hpp"
12
13 class ChangeValuesInPatternCommand final : public AbstractCommand
14 {
15 public:
16 ChangeValuesInPatternCommand(std::weak_ptr<Module> mod, int songNum,
17 int beginTrack, int beginColumn, int beginOrder, int beginStep,
18 int endTrack, int endColumn, int endStep, int value, bool isFMReversed);
19 bool redo() override;
20 bool undo() override;
21
22 private:
23 std::weak_ptr<Module> mod_;
24 int song_;
25 int bTrack_, bCol_, order_, bStep_;
26 int eTrack_, eCol_, eStep_;
27 int diff_;
28 bool fmReverse_;
29 std::vector<std::vector<int>> prevVals_;
30 };