iberbox  2.1.2
iberbox::ActionListener Class Reference

The Action Listener class. More...

Inheritance diagram for iberbox::ActionListener:
Collaboration diagram for iberbox::ActionListener:

Public Member Functions

 ActionListener ()
 Constructs a new Action Listener object. More...
 
 ActionListener (std::function< void(Action)> finishCallback)
 Constructs a new Action Listener object. More...
 
 ActionListener (std::function< void(Action)> progressCallback, std::function< void(Action)> finishCallback)
 
 ActionListener (std::function< void(Action)> errorCallback, std::function< void(Action)> progressCallback, std::function< void(Action)> finishCallback)
 
 ActionListener (std::function< void(Action)> startCallback, std::function< void(Action)> errorCallback, std::function< void(Action)> progressCallback, std::function< void(Action)> finishCallback)
 
virtual void onActionError (Action action)
 The method that will be executed when an error occurs within the action. More...
 
virtual void onActionFinish (Action action)
 The method that will be executed when the action finishes. More...
 
virtual void onActionProcessed (Action action)
 The method that will be executed when the action has been processed. More...
 
virtual void onActionProgress (Action action)
 The method that will be executed when the action's progress changes. More...
 
virtual void onActionStart (Action action)
 The method that will be executed when the action starts. More...
 
void setErrorCallback (std::function< void(Action)> errorCallback)
 
void setFinishCallback (std::function< void(Action)> finishCallback)
 
void setProgressCallback (std::function< void(Action)> progressCallback)
 
void setStartCallback (std::function< void(Action)> startCallback)
 
virtual ~ActionListener ()
 

Detailed Description

The Action Listener class.

Constructor & Destructor Documentation

◆ ActionListener() [1/5]

iberbox::ActionListener::ActionListener ( )

Constructs a new Action Listener object.

◆ ActionListener() [2/5]

iberbox::ActionListener::ActionListener ( std::function< void(Action)>  finishCallback)

Constructs a new Action Listener object.

Parameters
finishCallbackThe default function to be executed when the action finishes.

◆ ActionListener() [3/5]

iberbox::ActionListener::ActionListener ( std::function< void(Action)>  progressCallback,
std::function< void(Action)>  finishCallback 
)

◆ ActionListener() [4/5]

iberbox::ActionListener::ActionListener ( std::function< void(Action)>  errorCallback,
std::function< void(Action)>  progressCallback,
std::function< void(Action)>  finishCallback 
)

◆ ActionListener() [5/5]

iberbox::ActionListener::ActionListener ( std::function< void(Action)>  startCallback,
std::function< void(Action)>  errorCallback,
std::function< void(Action)>  progressCallback,
std::function< void(Action)>  finishCallback 
)

◆ ~ActionListener()

virtual iberbox::ActionListener::~ActionListener ( )
virtual

Member Function Documentation

◆ onActionError()

virtual void iberbox::ActionListener::onActionError ( Action  action)
virtual

The method that will be executed when an error occurs within the action.

Parameters
actionThe action in which an error has ocurred.

◆ onActionFinish()

virtual void iberbox::ActionListener::onActionFinish ( Action  action)
virtual

The method that will be executed when the action finishes.

Parameters
actionThe finished action.

Reimplemented in iberbox::Iberbox, and iberbox::BlockingActionListener.

◆ onActionProcessed()

virtual void iberbox::ActionListener::onActionProcessed ( Action  action)
virtual

The method that will be executed when the action has been processed.

Parameters
actionThe processed action.

◆ onActionProgress()

virtual void iberbox::ActionListener::onActionProgress ( Action  action)
virtual

The method that will be executed when the action's progress changes.

Parameters
actionThe action whose progress has changed.

Reimplemented in iberbox::BlockingActionListener.

◆ onActionStart()

virtual void iberbox::ActionListener::onActionStart ( Action  action)
virtual

The method that will be executed when the action starts.

Parameters
actionThe started action.

◆ setErrorCallback()

void iberbox::ActionListener::setErrorCallback ( std::function< void(Action)>  errorCallback)

◆ setFinishCallback()

void iberbox::ActionListener::setFinishCallback ( std::function< void(Action)>  finishCallback)

◆ setProgressCallback()

void iberbox::ActionListener::setProgressCallback ( std::function< void(Action)>  progressCallback)

◆ setStartCallback()

void iberbox::ActionListener::setStartCallback ( std::function< void(Action)>  startCallback)

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