OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Private Attributes | List of all members
WFiberActionToggle Class Reference

The action when toggling a fiber. More...

#include <WFiberActionToggle.h>

+ Inheritance diagram for WFiberActionToggle:
+ Collaboration diagram for WFiberActionToggle:

Public Types

typedef std::shared_ptr< WFiberActionToggleSPtr
 A shared_ptr to this class. More...
 
- Public Types inherited from WFiberAction
typedef std::shared_ptr< WFiberActionSPtr
 A shared_ptr to this class. More...
 

Public Member Functions

 WFiberActionToggle (size_t position, WFiberHandler *fiberHandler)
 Creates this action. More...
 
 ~WFiberActionToggle ()
 Empty destructor. More...
 
virtual void undo ()
 Undos this action. More...
 
virtual void redo ()
 Redos this action. More...
 
- Public Member Functions inherited from WFiberAction
virtual ~WFiberAction ()
 Empty virtual destructor. More...
 

Private Attributes

size_t m_position
 The position of this fiber in the fibers vector. More...
 
WFiberHandlerm_fiberHandler
 The WFiberHandler of the action. More...
 

Detailed Description

The action when toggling a fiber.

Definition at line 40 of file WFiberActionToggle.h.

Member Typedef Documentation

◆ SPtr

typedef std::shared_ptr< WFiberActionToggle > WFiberActionToggle::SPtr

A shared_ptr to this class.

Definition at line 46 of file WFiberActionToggle.h.

Constructor & Destructor Documentation

◆ WFiberActionToggle()

WFiberActionToggle::WFiberActionToggle ( size_t  position,
WFiberHandler fiberHandler 
)

Creates this action.

Parameters
positionThe position of this fiber in the fibers vector.
fiberHandlerThe WFiberHandler of the action.

Definition at line 30 of file WFiberActionToggle.cpp.

◆ ~WFiberActionToggle()

WFiberActionToggle::~WFiberActionToggle ( )

Empty destructor.

Definition at line 36 of file WFiberActionToggle.cpp.

Member Function Documentation

◆ redo()

void WFiberActionToggle::redo ( )
virtual

Redos this action.

Implements WFiberAction.

Definition at line 45 of file WFiberActionToggle.cpp.

References m_fiberHandler, m_position, and WFiberHandler::toggleFiber().

+ Here is the call graph for this function:

◆ undo()

void WFiberActionToggle::undo ( )
virtual

Undos this action.

Implements WFiberAction.

Definition at line 40 of file WFiberActionToggle.cpp.

References m_fiberHandler, m_position, and WFiberHandler::toggleFiber().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_fiberHandler

WFiberHandler* WFiberActionToggle::m_fiberHandler
private

The WFiberHandler of the action.

Definition at line 79 of file WFiberActionToggle.h.

Referenced by redo(), and undo().

◆ m_position

size_t WFiberActionToggle::m_position
private

The position of this fiber in the fibers vector.

Definition at line 74 of file WFiberActionToggle.h.

Referenced by redo(), and undo().


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