Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
ToggleNodeBreakpointCommand.cpp
Go to the documentation of this file.
1/**
2 * @file ToggleNodeBreakpointCommand.cpp
3 * @brief Implementation of ToggleNodeBreakpointCommand (Phase 2.0)
4 * @author Olympe Engine
5 * @date 2026-02-19
6 */
7
9#include "../../system/system_utils.h"
10
11namespace Olympe {
12namespace NodeGraph {
13
16 int nodeId)
17 : m_annotations(annotations)
18 , m_nodeId(nodeId)
19 , m_previousState(false)
20 , m_newState(false)
21{
22 if (m_annotations != nullptr)
23 {
25 m_previousState = (ann != nullptr) ? ann->hasBreakpoint : false;
27 }
28}
29
31{
32 if (m_annotations != nullptr)
33 {
35 SYSTEM_LOG << "[ToggleBreakpoint] Node " << m_nodeId
36 << " breakpoint -> " << (m_newState ? "ON" : "OFF") << std::endl;
37 }
38}
39
41{
42 if (m_annotations != nullptr)
43 {
45 SYSTEM_LOG << "[ToggleBreakpoint] Undo node " << m_nodeId
46 << " breakpoint -> " << (m_previousState ? "ON" : "OFF") << std::endl;
47 }
48}
49
51{
52 return std::string("Toggle Breakpoint on node ") + std::to_string(m_nodeId);
53}
54
55} // namespace NodeGraph
56} // namespace Olympe
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Command to toggle a node breakpoint (Phase 2.0)
Manages per-node annotations (breakpoints, comments, colors)
void SetBreakpoint(int nodeId, bool enabled)
Set breakpoint state for a node.
NodeAnnotation * GetAnnotation(int nodeId)
Get annotation for a node (non-const)
ToggleNodeBreakpointCommand(NodeAnnotationsManager *annotations, int nodeId)
Construct the command.
std::string GetDescription() const override
Get description of the command.
< Provides AssetID and INVALID_ASSET_ID
Holds annotation data for a single node.
#define SYSTEM_LOG