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

The action when adding a fiber. More...

#include <WFiberActionAddFiber.h>

+ Inheritance diagram for WFiberActionAddFiber:
+ Collaboration diagram for WFiberActionAddFiber:

Public Types

typedef std::shared_ptr< WFiberActionAddFiberSPtr
 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

 WFiberActionAddFiber (std::string name, size_t position, WFiberHandler *fiberHandler)
 Creates this action. More...
 
 ~WFiberActionAddFiber ()
 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

std::string m_name
 The name of the fiber. More...
 
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 adding a fiber.

Definition at line 40 of file WFiberActionAddFiber.h.

Member Typedef Documentation

◆ SPtr

A shared_ptr to this class.

Definition at line 46 of file WFiberActionAddFiber.h.

Constructor & Destructor Documentation

◆ WFiberActionAddFiber()

WFiberActionAddFiber::WFiberActionAddFiber ( std::string  name,
size_t  position,
WFiberHandler fiberHandler 
)

Creates this action.

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

Definition at line 30 of file WFiberActionAddFiber.cpp.

◆ ~WFiberActionAddFiber()

WFiberActionAddFiber::~WFiberActionAddFiber ( )

Empty destructor.

Definition at line 37 of file WFiberActionAddFiber.cpp.

Member Function Documentation

◆ redo()

void WFiberActionAddFiber::redo ( )
virtual

Redos this action.

Implements WFiberAction.

Definition at line 46 of file WFiberActionAddFiber.cpp.

References WFiberHandler::addFiberAt(), m_fiberHandler, m_name, and m_position.

+ Here is the call graph for this function:

◆ undo()

void WFiberActionAddFiber::undo ( )
virtual

Undos this action.

Implements WFiberAction.

Definition at line 41 of file WFiberActionAddFiber.cpp.

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

+ Here is the call graph for this function:

Member Data Documentation

◆ m_fiberHandler

WFiberHandler* WFiberActionAddFiber::m_fiberHandler
private

The WFiberHandler of the action.

Definition at line 85 of file WFiberActionAddFiber.h.

Referenced by redo(), and undo().

◆ m_name

std::string WFiberActionAddFiber::m_name
private

The name of the fiber.

Definition at line 75 of file WFiberActionAddFiber.h.

Referenced by redo().

◆ m_position

size_t WFiberActionAddFiber::m_position
private

The position of this fiber in the fibers vector.

Definition at line 80 of file WFiberActionAddFiber.h.

Referenced by redo(), and undo().


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