1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-17 00:42:24 +00:00
serenity/Editor/UndoStack.h
2018-12-04 00:27:16 +01:00

18 lines
298 B
C++

#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;
};