Loading...
Searching...
No Matches
RemoveAddress.hpp
1#pragma once
2#include <Device/Node/DeviceNode.hpp>
3
4#include <Explorer/Commands/DeviceExplorerCommandFactory.hpp>
5
6#include <score/command/Command.hpp>
7#include <score/model/path/Path.hpp>
8
9struct DataStreamInput;
10struct DataStreamOutput;
11
12namespace Explorer
13{
14class DeviceDocumentPlugin;
15namespace Command
16{
22class RemoveAddress final : public score::Command
23{
24 SCORE_COMMAND_DECL(
25 DeviceExplorerCommandFactoryName(), RemoveAddress, "Remove an address")
26public:
27 RemoveAddress(const DeviceDocumentPlugin& devplug, const Device::NodePath& nodePath);
28
29 void undo(const score::DocumentContext& ctx) const override;
30 void redo(const score::DocumentContext& ctx) const override;
31
32protected:
33 void serializeImpl(DataStreamInput&) const override;
34 void deserializeImpl(DataStreamOutput&) override;
35
36private:
37 Device::NodePath m_nodePath;
38 Device::Node m_savedNode;
39};
40}
41}
The RemoveAddress class.
Definition RemoveAddress.hpp:23
Path in a tree of QAbstractItemModel objects.
Definition TreePath.hpp:34
The Command class.
Definition Command.hpp:34
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18