summaryrefslogtreecommitdiff
path: root/Editor/UndoStack.h
blob: 5938dca21602c30b8e7cb798e3b6806692b74625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include <stack>
#include "Operation.h"
#include "OwnPtr.h"

class UndoStack {
public:
    UndoStack() { }

    void push(OwnPtr<Operation>&&);
    OwnPtr<Operation> pop();

    bool is_empty() const { return m_stack.empty(); }

private:
    std::stack<OwnPtr<Operation>> m_stack;
};