added nodes.

This commit is contained in:
Christoph Holzheuer
2026-04-02 15:15:28 +02:00
parent b05180f575
commit 0b54793b08
43 changed files with 4371 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
#ifndef NTX_CMDLIST_H
#define NTX_CMDLIST_H
#include <ntxicommand.h>
#include <vector>
namespace ntx
{
class NtxCmdList : public NtxICommand
{
public:
NtxCmdList();
explicit NtxCmdList(const NtxString& description);
~NtxCmdList() override = default;
bool execute() override;
bool undo() override;
bool canExecute() const override;
bool canUndo() const override;
NtxString getDescription() const override;
void addCommand(NtxCommandUPtr command);
void clear();
size_t count() const;
bool isEmpty() const;
private:
std::vector<NtxCommandUPtr> m_commands;
size_t m_executedCount;
void rollback(size_t upToIndex);
};
} // namespace ntx
#endif // NTX_CMDLIST_H