Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Olympe::NodeGraph::ToggleNodeBreakpointCommand Class Reference

Toggles the breakpoint state of a node (undo/redo-able) More...

#include <ToggleNodeBreakpointCommand.h>

+ Inheritance diagram for Olympe::NodeGraph::ToggleNodeBreakpointCommand:
+ Collaboration diagram for Olympe::NodeGraph::ToggleNodeBreakpointCommand:

Public Member Functions

 ToggleNodeBreakpointCommand (NodeAnnotationsManager *annotations, int nodeId)
 Construct the command.
 
void Execute () override
 Execute the command.
 
void Undo () override
 Undo the command.
 
std::string GetDescription () const override
 Get description of the command.
 
- Public Member Functions inherited from Olympe::NodeGraph::ICommand
virtual ~ICommand ()=default
 

Private Attributes

NodeAnnotationsManagerm_annotations
 
int m_nodeId
 
bool m_previousState
 
bool m_newState
 

Detailed Description

Toggles the breakpoint state of a node (undo/redo-able)

Definition at line 20 of file ToggleNodeBreakpointCommand.h.

Constructor & Destructor Documentation

◆ ToggleNodeBreakpointCommand()

Olympe::NodeGraph::ToggleNodeBreakpointCommand::ToggleNodeBreakpointCommand ( NodeAnnotationsManager annotations,
int  nodeId 
)

Construct the command.

Parameters
annotationsAnnotations manager to operate on
nodeIdTarget node ID

Definition at line 14 of file ToggleNodeBreakpointCommand.cpp.

References Olympe::NodeGraph::NodeAnnotationsManager::GetAnnotation(), GetComponentTypeID_Static(), Olympe::NodeGraph::NodeAnnotation::hasBreakpoint, m_annotations, m_newState, m_nodeId, and m_previousState.

+ Here is the call graph for this function:

Member Function Documentation

◆ Execute()

void Olympe::NodeGraph::ToggleNodeBreakpointCommand::Execute ( )
overridevirtual

Execute the command.

Implements Olympe::NodeGraph::ICommand.

Definition at line 30 of file ToggleNodeBreakpointCommand.cpp.

References m_annotations, m_newState, m_nodeId, Olympe::NodeGraph::NodeAnnotationsManager::SetBreakpoint(), and SYSTEM_LOG.

+ Here is the call graph for this function:

◆ GetDescription()

std::string Olympe::NodeGraph::ToggleNodeBreakpointCommand::GetDescription ( ) const
overridevirtual

Get description of the command.

Implements Olympe::NodeGraph::ICommand.

Definition at line 50 of file ToggleNodeBreakpointCommand.cpp.

References m_nodeId.

◆ Undo()

void Olympe::NodeGraph::ToggleNodeBreakpointCommand::Undo ( )
overridevirtual

Undo the command.

Implements Olympe::NodeGraph::ICommand.

Definition at line 40 of file ToggleNodeBreakpointCommand.cpp.

References m_annotations, m_nodeId, m_previousState, Olympe::NodeGraph::NodeAnnotationsManager::SetBreakpoint(), and SYSTEM_LOG.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_annotations

NodeAnnotationsManager* Olympe::NodeGraph::ToggleNodeBreakpointCommand::m_annotations
private

Definition at line 34 of file ToggleNodeBreakpointCommand.h.

Referenced by Execute(), ToggleNodeBreakpointCommand(), and Undo().

◆ m_newState

bool Olympe::NodeGraph::ToggleNodeBreakpointCommand::m_newState
private

Definition at line 37 of file ToggleNodeBreakpointCommand.h.

Referenced by Execute(), and ToggleNodeBreakpointCommand().

◆ m_nodeId

int Olympe::NodeGraph::ToggleNodeBreakpointCommand::m_nodeId
private

◆ m_previousState

bool Olympe::NodeGraph::ToggleNodeBreakpointCommand::m_previousState
private

Definition at line 36 of file ToggleNodeBreakpointCommand.h.

Referenced by ToggleNodeBreakpointCommand(), and Undo().


The documentation for this class was generated from the following files: