Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
ConnectPinsCommand.cpp
Go to the documentation of this file.
1/**
2 * @file ConnectPinsCommand.cpp
3 * @brief Implementation of ConnectPinsCommand
4 * @author Olympe Engine
5 * @date 2026-02-18
6 */
7
9
10namespace Olympe {
11namespace NodeGraph {
12
14 : m_graph(graph)
15 , m_fromPin(fromPin)
16 , m_toPin(toPin)
17{
18}
19
21{
22 if (m_graph != nullptr)
23 {
25 }
26}
27
29{
30 if (m_graph != nullptr && m_createdLinkId.value != 0)
31 {
33 }
34}
35
37{
38 return "Connect Pins";
39}
40
41} // namespace NodeGraph
42} // namespace Olympe
Command for connecting pins.
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
ConnectPinsCommand(GraphDocument *graph, PinId fromPin, PinId toPin)
void Undo() override
Undo the command.
void Execute() override
Execute the command.
std::string GetDescription() const override
Get description of the command.
Main document class for a node graph.
LinkId ConnectPins(PinId fromPin, PinId toPin)
Connect two pins with a link.
bool DisconnectLink(LinkId id)
Disconnect a link.
< Provides AssetID and INVALID_ASSET_ID