Debian Codegraph @

BambooTracker/command/order/move_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 MoveOrderCommand final : public AbstractCommand
13 {
14 public:
15 MoveOrderCommand(std::weak_ptr<Module> mod, int songNum, int orderNum, bool isUp);
16 bool redo() override;
17 bool undo() override;
18
19 private:
20 std::weak_ptr<Module> mod_;
21 int song_, order_;
22 bool isUp_;
23
24 void swap();
25 };